Public Member Functions | Data Fields

ilSearchAdministrationGUI Class Reference

Public Member Functions

 ilSearchAdministrationGUI ($a_user_id)
 Constructor public.
 performAction ()
 setUserId ($a_user_id)
 getUserId ()
 setFolderId ($a_folder_id)
 getFolderId ()
 setViewmode ($a_viewmode)
 getViewmode ()
 createNewFolder ()
 deleteFolders ()
 __showTree ()
 __show ()
 __showRename ()
 __renameItem ($a_id)
 __moveItem ()
 __showCreateFolder ()
 __showConfirmDeleteFolder ()
 __showCreateFolderForm ()
 __showRenameForm ($a_old_title)
 __showHeader ()
 __showLocator ()
 __showTabs ()
 __getActions ()
 __showFolders ()
 __appendParentLink ($nr_items)
 __formatTitle ($a_item)
 __formatLink ($a_item)
 getChildFolders ()

Data Fields

 $ilias
 $folder_obj
 $search
 $tpl
 $lng
 $tree
 $res_type
 $offset
 $sort_by
 $sort_order
 $folder_id
 $viewmode
 $message

Detailed Description

Definition at line 37 of file class.ilSearchAdministrationGUI.php.


Member Function Documentation

ilSearchAdministrationGUI::__appendParentLink ( nr_items  ) 

Definition at line 645 of file class.ilSearchAdministrationGUI.php.

References __formatLink(), __formatTitle(), and getFolderId().

Referenced by __showFolders().

        {
                if($this->getFolderId() == $this->folder_obj->getRootId())
                {
                        return false;
                }
                else
                {
                        if($nr_items)
                        {
                                $this->tpl->setVariable("CHECK"," ");
                        }
                        $this->tpl->setCurrentBlock("TBL_FOLDER_ROW");
                        $this->tpl->setVariable("ROWCOL","tblrow1");

                        list($link,$target) = $this->__formatLink(array("type" => "top"));
                        $this->tpl->setVariable("FOLDER_LINK",$link);
                        $this->tpl->setVariable("FOLDER_TARGET",$target);
                        $this->tpl->setVariable("FOLDER_TITLE",$this->__formatTitle(array("type" => "top")));
                        $this->tpl->parseCurrentBlock();
                        return true;
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__formatLink ( a_item  ) 

Definition at line 693 of file class.ilSearchAdministrationGUI.php.

References ilFrameTargetInfo::_getFrame(), and getUserId().

Referenced by __appendParentLink(), and __showFolders().

        {
                switch($a_item["type"])
                {
                        case "seaf":
                                $target = ilFrameTargetInfo::_getFrame("MainContent");
                                $link = "./search_administration.php?folder_id=".$a_item["obj_id"];

                                return array($link,$target);

                        case "sea":
                                include_once "./classes/class.ilSearchResult.php";

                                $tmp_obj =& new ilSearchResult($this->getUserId(),$a_item["obj_id"]);

                                $link = $tmp_obj->createLink();
                                unset($tmp_obj);

                                return $link;
                                
                        case "top":
                                $parent_id = $this->folder_obj->getParentId();
                                $target = ilFrameTargetInfo::_getFrame("MainContent");
                                $link = "./search_administration.php?folder_id=".$parent_id;

                                return array($link,$target);
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__formatTitle ( a_item  ) 

Definition at line 669 of file class.ilSearchAdministrationGUI.php.

References $img, and ilUtil::getImagePath().

Referenced by __appendParentLink(), and __showFolders().

        {
                switch($a_item["type"])
                {
                        case "seaf":
                                $img = "<img border=\"0\" vspace=\"0\" align=\"left\" src=\"".
                                        ilUtil::getImagePath("icon_cat.gif")."\">&nbsp;";
                                
                                return $img.$a_item["title"];

                        case "sea":
                                $img = "<img border=\"0\" vspace=\"0\" align=\"left\" src=\"".
                                        ilUtil::getImagePath("icon_bm.gif")."\">&nbsp;";
                                
                                return $img.$a_item["title"];

                        case "top":
                                $img = "<img border=\"0\" vspace=\"0\" align=\"left\" src=\"".
                                        ilUtil::getImagePath("icon_cat.gif")."\">&nbsp;";

                                return $img."..";
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__getActions (  ) 

Definition at line 560 of file class.ilSearchAdministrationGUI.php.

References $_POST, and formSelect().

Referenced by __showFolders().

        {
                $options[0] = $this->lng->txt("search_select_one_action");

                if($this->folder_obj->hasResults() and $this->folder_obj->countFolders())
                {
                        // SHOW MOVE TO
                        $tree_data = $this->folder_obj->getTree();

                        foreach($tree_data as $node)
                        {
                                $prefix = $this->lng->txt("search_move_to") ;
                                for($i = 0; $i < $node["depth"];++$i)
                                {
                                        $prefix .= "&nbsp;&nbsp;";
                                }
                                if($node["obj_id"] == $this->folder_obj->getRootId())
                                {
                                        $options[$node["obj_id"]] = $prefix.$this->lng->txt("search_search_results");
                                }
                                else
                                {
                                        $options[$node["obj_id"]] = $prefix.$node["title"];
                                }

                        }                       

                }
                // SHOW RENAME
                $options["rename"] = $this->lng->txt("rename");

                // SHOW DELETE
                $options["delete"] = $this->lng->txt("delete");

                return ilUtil::formSelect($_POST["action"],"action",$options,false,true);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__moveItem (  ) 

Definition at line 354 of file class.ilSearchAdministrationGUI.php.

References $_POST, $id, ilSearchItemFactory::getInstance(), and getUserId().

Referenced by performAction().

        {
                if(!count($_POST["del_id"]))
                {
                        $this->message = $this->lng->txt("");
                        return false;
                }
                
                include_once "./classes/class.ilSearchItemFactory.php";

                // CHECK IF MOVE ACTION IS POSSIBLE
                foreach($_POST["del_id"] as $id)
                {
                        $tmp_obj = ilSearchItemFactory::getInstance($id);

                        if($tmp_obj->getType() == "seaf")
                        {
                                $this->message = $this->lng->txt("search_move_folders_not_allowed");
                                return false;
                        }
                        $objects[] =& $tmp_obj;
                        unset($tmp_obj);
                }
                include_once "./classes/class.ilSearchFolder.php";
                include_once "./classes/class.ilSearchResult.php";

                $tmp_folder =& new ilSearchFolder($this->getUserId(),$_POST["action"]);
                
                // MOVE ITEMS
                foreach($objects as $obj)
                {
                        // COPY DATA
                        $search_res_obj =& new ilSearchResult($this->getUserId());
                        $search_res_obj->setTitle($obj->getTitle());
                        $search_res_obj->setTarget(addslashes(serialize($obj->getTarget())));
                        
                        $tmp_folder->assignResult($search_res_obj);

                        // AND FINALLY:
                        $this->folder_obj->delete($obj->getObjId());
                        unset($search_res_obj);
                }
                unset($objects);
                $this->message = $this->lng->txt("search_objects_moved");

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__renameItem ( a_id  ) 

Definition at line 339 of file class.ilSearchAdministrationGUI.php.

References $_POST, and ilSearchItemFactory::getInstance().

Referenced by performAction().

        {
                include_once "./classes/class.ilSearchItemFactory.php";

                $tmp_obj = ilSearchItemFactory::getInstance($a_id);

                $tmp_obj->updateTitle(ilUtil::stripslashes($_POST["title"]));

                $this->message = $this->lng->txt("search_object_renamed");
                
                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__show (  ) 

Definition at line 276 of file class.ilSearchAdministrationGUI.php.

References __showFolders(), __showHeader(), __showLocator(), __showTabs(), getFolderId(), infoPanel(), and sendInfo().

Referenced by performAction().

        {
                // SHOW SEARCH ADMINISTRATION PAGE
                $this->tpl->addBlockFile("CONTENT","content","tpl.search_administration.html");
                $this->tpl->addBlockFile("STATUSLINE","statusline","tpl.statusline.html");
                infoPanel();
                $this->tpl->setVariable("SEARCH_ADMINISTRATION_ACTION","./search_administration.php?folder_id=".$this->getFolderId());
                
                $this->__showHeader();
                $this->__showLocator();
                $this->__showTabs();


                $this->__showFolders();

                if($this->message)
                {
                        sendInfo($this->message);
                }

        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showConfirmDeleteFolder (  ) 

Definition at line 423 of file class.ilSearchAdministrationGUI.php.

References $_POST, and sendInfo().

Referenced by performAction().

        {
                if(!count($_POST["del_id"]))
                {
                        sendInfo($this->lng->txt("search_no_selection"));
                        return false;
                }
                sendInfo($this->lng->txt("search_delete_sure"));

                $this->tpl->setCurrentBlock("CONFIRM_DELETE");
                $this->tpl->setVariable("TXT_DELETE_CANCEL",$this->lng->txt("cancel"));
                $this->tpl->setVariable("TXT_DELETE_CONFIRM",$this->lng->txt("delete"));
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showCreateFolder (  ) 

Definition at line 403 of file class.ilSearchAdministrationGUI.php.

References __showCreateFolderForm(), __showHeader(), __showLocator(), __showTabs(), getFolderId(), infoPanel(), and sendInfo().

Referenced by performAction().

        {
                // SHOW SEARCH ADMINISTRATION PAGE
                $this->tpl->addBlockFile("CONTENT","content","tpl.search_administration.html");
                $this->tpl->addBlockFile("STATUSLINE","statusline","tpl.statusline.html");
                infoPanel();
                $this->tpl->setVariable("SEARCH_ADMINISTRATION_ACTION","./search_administration.php?folder_id=".$this->getFolderId());
                
                $this->__showHeader();
                $this->__showLocator();
                $this->__showTabs();

                $this->__showCreateFolderForm();
                if($this->message)
                {
                        sendInfo($this->message);
                }

        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showCreateFolderForm (  ) 

Definition at line 438 of file class.ilSearchAdministrationGUI.php.

References getFolderId().

Referenced by __showCreateFolder().

        {
                $this->tpl->setVariable("SEARCH_ADMINISTRATION_ACTION","./search_administration.php?folder_id=".$this->getFolderId());

                $this->tpl->setCurrentBlock("FOLDER_CREATE_FORM");
                $this->tpl->setVariable("FOLDER_CREATE_FORM_TXT",$this->lng->txt("search_new_folder"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_TITLE_TXT",$this->lng->txt("title"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_VALUE","");
                $this->tpl->setVariable("FOLDER_CREATE_FORM_CMD","create_folder");
                $this->tpl->setVariable("FOLDER_CREATE_FORM_SUBMIT_1",$this->lng->txt("cancel"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_SUBMIT_2",$this->lng->txt("save"));
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showFolders (  ) 

Definition at line 599 of file class.ilSearchAdministrationGUI.php.

References $_POST, $counter, __appendParentLink(), __formatLink(), __formatTitle(), __getActions(), ilUtil::formCheckbox(), getChildFolders(), getFolderId(), and ilUtil::getImagePath().

Referenced by __show().

        {
                $items = $this->getChildFolders();

                if(count($items) or $this->getFolderId() != $this->folder_obj->getRootId())
                {
                        $counter = $this->__appendParentLink(count($items)) ? 0 : 1;
                        foreach($items as $item)
                        {
                                $checked = (is_array($_POST["del_id"]) and in_array($item["obj_id"],$_POST["del_id"])) ? 1 : 0;

                                $this->tpl->setVariable("CHECK",ilUtil::formCheckbox($checked,"del_id[]",$item["obj_id"]));

                                $this->tpl->setCurrentBlock("TBL_FOLDER_ROW");
                                $this->tpl->setVariable("ROWCOL",$counter % 2 ? "tblrow1" : "tblrow2");

                                list($link,$target) = $this->__formatLink($item);
                                $this->tpl->setVariable("FOLDER_LINK",$link);
                                $this->tpl->setVariable("FOLDER_TARGET",$target);
                                $this->tpl->setVariable("FOLDER_TITLE",$this->__formatTitle($item));
                                $this->tpl->parseCurrentBlock();
                                ++$counter;
                        }
                        if(count($items))
                        {
                                $this->tpl->setCurrentBlock("TBL_FOOTER");
                                $this->tpl->setVariable("TBL_FOOTER_IMG_SRC",ilUtil::getImagePath("arrow_downright.gif"));
                                $this->tpl->setVariable("TBL_FOOTER_SELECT",$this->__getActions());
                                $this->tpl->setVariable("TBL_FOOTER_SUBMIT",$this->lng->txt("ok"));
                                $this->tpl->parseCurrentBlock();
                        }
                }
                else
                {
                        $this->tpl->setCurrentBlock("TBL_ROW_FOLDER");
                        $this->tpl->setVariable("TXT_NO_FOLDER",$this->lng->txt("search_no_results_saved"));
                        $this->tpl->parseCurrentBlock();
                }
                $this->tpl->setCurrentBlock("TBL_FOLDER");
                $this->tpl->setVariable("COLSPAN",count($items) ? 2 : 1);
                $this->tpl->setVariable("TXT_FOLDER_HEADER",$this->lng->txt("search_my_search_results"));
                $this->tpl->setVariable("TXT_FOLDER_TITLE",$this->lng->txt("title"));
                $this->tpl->parseCurrentBlock();
                
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showHeader (  ) 

Definition at line 466 of file class.ilSearchAdministrationGUI.php.

References formSelect(), getFolderId(), ilUtil::getImagePath(), and getViewmode().

Referenced by __show(), __showCreateFolder(), __showRename(), and __showTree().

        {
                if($this->getFolderId() == $this->folder_obj->getRootId())
                {
                        $this->tpl->setVariable("TXT_HEADER",$this->lng->txt("search_search_results"));
                }
                else
                {
                        // SHOW BACK TO TOP IMAGE
                        $this->tpl->setVariable("TXT_HEADER",$this->folder_obj->getTitle());
                        $this->tpl->setCurrentBlock("top");
                        $this->tpl->setVariable("LINK_TOP", "search_administration.php?folder_id=".$this->folder_obj->getParentId());
                        $this->tpl->setVariable("IMG_TOP",ilUtil::getImagePath("ic_top.gif"));
                        $this->tpl->parseCurrentBlock();
                }
                // SHOW TREE/FLAT IMAGES
                $this->tpl->setVariable("H_FORMACTION","./search_administration.php?folder_id=".$this->getFolderId());

                $this->tpl->setCurrentBlock("content");
                $this->tpl->setVariable("LINK_FLAT", "search_administration.php?viewmode=flat&folder_id=".$this->getFolderId());
                $this->tpl->setVariable("IMG_FLAT",ilUtil::getImagePath("ic_flatview.gif"));

                $this->tpl->setVariable("LINK_TREE", "search_administration.php?viewmode=tree&folder_id".$this->getFolderId());
                $this->tpl->setVariable("IMG_TREE",ilUtil::getImagePath("ic_treeview.gif"));

                if($this->getViewmode() == 'flat')
                {
                        $this->tpl->setCurrentBlock("commands");
                        // possible subobjects
                        $opts = ilUtil::formSelect("", "new_type", array("folder"));
                        $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
                        $this->tpl->setVariable("BTN_NAME", "create");
                        $this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
                        $this->tpl->parseCurrentBlock();
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showLocator (  ) 

Definition at line 503 of file class.ilSearchAdministrationGUI.php.

References ilFrameTargetInfo::_getFrame().

Referenced by __show(), __showCreateFolder(), __showRename(), and __showTree().

        {
                $path_info = $this->folder_obj->getPath();

                $this->tpl->addBlockFile("LOCATOR","locator","tpl.locator.html");

                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("LINK_ITEM","./search.php");
                $this->tpl->setVariable("LINK_TARGET", ilFrameTargetInfo::_getFrame("MainContent"));
                $this->tpl->setVariable("ITEM",$this->lng->txt("mail_search_word"));
                $this->tpl->parseCurrentBlock();

                $this->tpl->touchBlock("locator_separator_prefix");
                $this->tpl->setCurrentBlock("locator_item");
                $this->tpl->setVariable("LINK_ITEM","./search_administration.php");
                $this->tpl->setVariable("LINK_TARGET",ilFrameTargetInfo::_getFrame("MainContent"));
                $this->tpl->setVariable("ITEM",$this->lng->txt("search_search_results"));
                $this->tpl->parseCurrentBlock();

                for($i = 1; $i < count($path_info); ++$i)
                {
                        $this->tpl->touchBlock("locator_separator_prefix");
                        $this->tpl->setCurrentBlock("locator_item");
                        $this->tpl->setVariable("LINK_ITEM","./search_administration.php?folder_id=".$path_info[$i]["child"]);
                        $this->tpl->setVariable("LINK_TARGET",ilFrameTargetInfo::_getFrame("MainContent"));
                        $this->tpl->setVariable("ITEM",$path_info[$i]["title"]);
                        $this->tpl->parseCurrentBlock();
                }

                $this->tpl->setCurrentBlock("locator");
                $this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
                $this->tpl->parseCurrentBlock();

        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showRename (  ) 

Definition at line 298 of file class.ilSearchAdministrationGUI.php.

References $_POST, $_SESSION, __showHeader(), __showLocator(), __showRenameForm(), __showTabs(), getFolderId(), ilSearchItemFactory::getInstance(), infoPanel(), and sendInfo().

Referenced by performAction().

        {
                // NO ITEM SELECTED
                if(!count($_POST["del_id"]))
                {
                        $this->message = $this->lng->txt("search_select_exactly_one_object");
                        return false;
                }
                // TOO MANY ITEMS SELECTED
                if(count($_POST["del_id"]) > 1)
                {
                        $this->message = $this->lng->txt("search_select_exactly_one_object");
                        return false;
                }

                // SHOW SEARCH ADMINISTRATION PAGE
                $this->tpl->addBlockFile("CONTENT","content","tpl.search_administration.html");
                $this->tpl->addBlockFile("STATUSLINE","statusline","tpl.statusline.html");
                infoPanel();
                $this->tpl->setVariable("SEARCH_ADMINISTRATION_ACTION","./search_administration.php?folder_id=".$this->getFolderId());
                
                $this->__showHeader();
                $this->__showLocator();
                $this->__showTabs();

                // GET OLD TITLE
                include_once "./classes/class.ilSearchItemFactory.php";

                $tmp_obj = ilSearchItemFactory::getInstance($_POST["del_id"][0]);
                $this->__showRenameForm($tmp_obj->getTitle());
                unset($tmp_obj);

                // SET SESSION VARIABLE TO REMEMBER obj_id
                $_SESSION["search_rename"] = $_POST["del_id"][0];

                if($this->message)
                {
                        sendInfo($this->message);
                }
                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showRenameForm ( a_old_title  ) 

Definition at line 452 of file class.ilSearchAdministrationGUI.php.

References getFolderId().

Referenced by __showRename().

        {
                $this->tpl->setVariable("SEARCH_ADMINISTRATION_ACTION","./search_administration.php?folder_id=".$this->getFolderId());

                $this->tpl->setCurrentBlock("FOLDER_CREATE_FORM");
                $this->tpl->setVariable("FOLDER_CREATE_FORM_TXT",$this->lng->txt("search_rename_title"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_TITLE_TXT",$this->lng->txt("title"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_VALUE",$a_old_title);
                $this->tpl->setVariable("FOLDER_CREATE_FORM_CMD","rename");
                $this->tpl->setVariable("FOLDER_CREATE_FORM_SUBMIT_1",$this->lng->txt("cancel"));
                $this->tpl->setVariable("FOLDER_CREATE_FORM_SUBMIT_2",$this->lng->txt("rename"));
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showTabs (  ) 

Definition at line 538 of file class.ilSearchAdministrationGUI.php.

References getFolderId().

Referenced by __show(), __showCreateFolder(), __showRename(), and __showTree().

        {
                $this->tpl->addBlockFile("TABS","tabs","tpl.tabs.html");

                if($this->res_type)
                {
                        $this->tpl->setCurrentBlock("tab");
                        $this->tpl->setVariable("TAB_TYPE","tabinactive");
                        $this->tpl->setVariable("TAB_LINK","search.php");
                        $this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search_all_results"));
                        $this->tpl->parseCurrentBlock();
                }
                // SEARCH ADMINISTRATION
                $this->tpl->setCurrentBlock("tab");
                $this->tpl->setVariable("TAB_TYPE","tabinactive");
                $this->tpl->setVariable("TAB_LINK","search.php?folder_id=".$this->getFolderId());
                $this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search"));
                $this->tpl->parseCurrentBlock();

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::__showTree (  ) 

Definition at line 235 of file class.ilSearchAdministrationGUI.php.

References $_GET, $exp, $expanded, $output, __showHeader(), __showLocator(), __showTabs(), getUserId(), infoPanel(), and sendInfo().

Referenced by performAction().

        {
                // SHOW SEARCH ADMINISTRATION PAGE
                $this->tpl->addBlockFile("CONTENT","content","tpl.search_administration_explorer.html");
                $this->tpl->addBlockFile("STATUSLINE","statusline","tpl.statusline.html");
                infoPanel();

                $this->__showTabs();
                $this->__showLocator();

                // output message
                if($this->message)
                {
                        sendInfo($this->message);
                }

                // set header
                $this->__showHeader();

                require_once ("classes/class.ilSearchResultExplorer.php");
                $exp = new ilSearchResultExplorer("search_administration.php",$this->getUserId());
                $exp->setTargetGet("folder_id");

                if ($_GET["sea_expand"] == "")
                {
                        $expanded = 1;
                }
                else
                {
                        $expanded = $_GET["sea_expand"];
                }

                $exp->setExpand($expanded);
                // build html-output
                $exp->setOutput(0);
                $output = $exp->getOutput();

                $this->tpl->setVariable("EXPLORER", $output);
        }               

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::createNewFolder (  ) 

Definition at line 220 of file class.ilSearchAdministrationGUI.php.

References $_POST.

Referenced by performAction().

        {
                $new_folder_obj = $this->folder_obj->create(ilUtil::stripslashes($_POST["title"]));
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::deleteFolders (  ) 

Definition at line 225 of file class.ilSearchAdministrationGUI.php.

References $_POST, and $folder_id.

Referenced by performAction().

        {
                foreach($_POST["del_id"] as $folder_id)
                {
                        $this->folder_obj->delete($folder_id);
                }
                $this->message = $this->lng->txt("search_objects_deleted");
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::getChildFolders (  ) 

Definition at line 722 of file class.ilSearchAdministrationGUI.php.

Referenced by __showFolders().

        {
                return $folder = $this->folder_obj->getChilds();
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::getFolderId (  ) 

Definition at line 192 of file class.ilSearchAdministrationGUI.php.

Referenced by __appendParentLink(), __show(), __showCreateFolder(), __showCreateFolderForm(), __showFolders(), __showHeader(), __showRename(), __showRenameForm(), and __showTabs().

        {
                return $this->folder_id;
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::getUserId (  ) 

Definition at line 184 of file class.ilSearchAdministrationGUI.php.

Referenced by __formatLink(), __moveItem(), __showTree(), and ilSearchAdministrationGUI().

        {
                return $this->user_id;
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::getViewmode (  ) 

Definition at line 215 of file class.ilSearchAdministrationGUI.php.

Referenced by __showHeader(), and performAction().

        {
                return $this->viewmode;
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::ilSearchAdministrationGUI ( a_user_id  ) 

Constructor public.

Definition at line 72 of file class.ilSearchAdministrationGUI.php.

References $_GET, $ilias, $lng, $tpl, getUserId(), performAction(), setFolderId(), setUserId(), and setViewmode().

        {
                global $ilias,$tpl,$lng;

                // DEFINE SOME CONSTANTS
                define("RESULT_LIMIT",10);
                
                // Initiate variables
                $this->ilias    =& $ilias;
                $this->tpl              =& $tpl;
                $this->lng              =& $lng;
                $this->lng->loadLanguageModule("search");


                $this->folder_id  = $_GET["folder_id"];
                $this->res_type   = $_GET["res_type"];
                $this->offset     = $_GET["offset"];
                $this->sort_by    = $_GET["sort_by"];
                $this->sort_order = $_GET["sort_order"];
                
                $this->setUserId($a_user_id);
                $this->setViewmode($_GET["viewmode"]);

                // INITIATE SEARCH OBJECT
                $this->search =& new ilSearch($a_user_id);
                $this->folder_obj =& new ilSearchFolder($this->getUserId(),$_GET["folder_id"]);
                $this->tree = new ilTree(1);

                $this->setFolderId($_GET["folder_id"] ? $_GET["folder_id"] : $this->folder_obj->getRootId());

                $this->performAction();
        }

Here is the call graph for this function:

ilSearchAdministrationGUI::performAction (  ) 

Definition at line 105 of file class.ilSearchAdministrationGUI.php.

References $_POST, $_SESSION, __moveItem(), __renameItem(), __show(), __showConfirmDeleteFolder(), __showCreateFolder(), __showRename(), __showTree(), createNewFolder(), deleteFolders(), and getViewmode().

Referenced by ilSearchAdministrationGUI().

        {
                if(!isset($_POST["cmd"]))
                {
                        if($this->getViewmode() == "flat")
                        {
                                $this->__show();
                        }
                        else
                        {
                                $this->__showTree();
                                return true;
                        }
                }
                if(isset($_POST["cmd"]["cancel"]))
                {
                        session_unregister("search_rename");
                        unset($_POST["del_id"]);
                        $this->__show();
                }
                if(isset($_POST["cmd"]["create"]))
                {
                        $this->__showCreateFolder();
                }
                if(isset($_POST["cmd"]["create_folder"]))
                {
                        $this->createNewFolder();
                        $this->__show();
                }
                if(isset($_POST["cmd"]["delete"]))
                {
                        $this->__show();
                        $this->__showConfirmDeleteFolder();
                }
                if(isset($_POST["cmd"]["confirmed_delete"]))
                {
                        $this->deleteFolders();
                        $this->__show();
                }
                if(isset($_POST["cmd"]["rename"]))
                {
                        $this->__renameItem($_SESSION["search_rename"]);
                        $this->__show();
                }

                if(isset($_POST["cmd"]["do_it"]))
                {
                        switch($_POST["action"])
                        {
                                case "0":
                                        $this->message = $this->lng->txt("search_select_one_action");
                                        $this->__show();
                                        break;

                                case "rename":
                                        if(!$this->__showRename())
                                        {
                                                $this->__show();
                                        }
                                        break;
                                        
                                case "delete":
                                        $this->__show();
                                        $this->__showConfirmDeleteFolder();
                                        break;

                                default:
                                        $this->__moveItem();
                                        $this->__show();
                                        break;
                        }
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilSearchAdministrationGUI::setFolderId ( a_folder_id  ) 

Definition at line 188 of file class.ilSearchAdministrationGUI.php.

Referenced by ilSearchAdministrationGUI().

        {
                $this->folder_id = $a_folder_id;
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::setUserId ( a_user_id  ) 

Definition at line 179 of file class.ilSearchAdministrationGUI.php.

Referenced by ilSearchAdministrationGUI().

        {
                $this->user_id = $a_user_id;
                
        }

Here is the caller graph for this function:

ilSearchAdministrationGUI::setViewmode ( a_viewmode  ) 

Definition at line 196 of file class.ilSearchAdministrationGUI.php.

References $_SESSION.

Referenced by ilSearchAdministrationGUI().

        {
                switch($a_viewmode)
                {
                        case "flat":
                                $this->viewmode = "flat";
                                $_SESSION["s_viewmode"] = "flat";
                                break;

                        case "tree":
                                $this->viewmode = "tree";
                                $_SESSION["s_viewmode"] = "tree";
                                break;
                                
                        default:
                                $this->viewmode = $_SESSION["s_viewmode"] ? $_SESSION["s_viewmode"] : "flat";
                                break;
                }
        }

Here is the caller graph for this function:


Field Documentation

ilSearchAdministrationGUI::$folder_id

Definition at line 63 of file class.ilSearchAdministrationGUI.php.

Referenced by deleteFolders().

ilSearchAdministrationGUI::$folder_obj

Definition at line 51 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$ilias

Definition at line 44 of file class.ilSearchAdministrationGUI.php.

Referenced by ilSearchAdministrationGUI().

ilSearchAdministrationGUI::$lng

Definition at line 54 of file class.ilSearchAdministrationGUI.php.

Referenced by ilSearchAdministrationGUI().

ilSearchAdministrationGUI::$message

Definition at line 66 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$offset

Definition at line 59 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$res_type

Definition at line 58 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$search

Definition at line 52 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$sort_by

Definition at line 60 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$sort_order

Definition at line 61 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$tpl

Definition at line 53 of file class.ilSearchAdministrationGUI.php.

Referenced by ilSearchAdministrationGUI().

ilSearchAdministrationGUI::$tree

Definition at line 55 of file class.ilSearchAdministrationGUI.php.

ilSearchAdministrationGUI::$viewmode

Definition at line 64 of file class.ilSearchAdministrationGUI.php.


The documentation for this class was generated from the following file: