20use ILIAS\Object\CreationCallbackTrait;
 
   38    use CreationCallbackTrait;
 
   77        $ilCtrl = 
$DIC[
'ilCtrl'];
 
   81        $ilMainMenu = 
$DIC[
'ilMainMenu'];
 
   84        $this->ctrl = &$ilCtrl;
 
   87        $this->lng->loadLanguageModule(
'search');
 
   89        $ilMainMenu->setActive(
'search');
 
   92        $this->
user = $DIC->user();
 
   99        $ilLocator = 
$DIC[
'ilLocator'];
 
  102        $this->tpl->loadStandardTemplate();
 
  109        $this->tpl->setTitleIcon(
 
  113        $this->tpl->setTitle(
$lng->txt(
"search"));
 
  126        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  128        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  130        $this->form->setOpenTag(
false);
 
  131        $this->form->setCloseTag(
false);
 
  136        $this->form->addItem($radg);
 
  139            if ($a_mode == self::SEARCH_FORM_STANDARD) {
 
  149                $radg->addOption($op1);
 
  152                $op2 = 
new ilCheckboxInputGUI($this->lng->txt(
'search_filter_by_type'), 
'item_filter_enabled');
 
  159            $cbgr->setUseValuesAsKeys(
true);
 
  160            $details = $this->getDetails();
 
  164                if ($details[
$type]) {
 
  167                $cbgr->addOption($cb);
 
  169            if ($a_mode == self::SEARCH_FORM_LUCENE) {
 
  171                    $mimes = $this->getMimeDetails();
 
  177                        $cbgr->addOption($op3);
 
  182            $cbgr->setValue(array_merge((array) $details, (array) $mimes));
 
  183            $op2->addSubItem($cbgr);
 
  185            if ($a_mode != self::SEARCH_FORM_STANDARD && $det) {
 
  186                $op2->setChecked(
true);
 
  190                $radg->addOption($op2);
 
  191                $this->form->addItem($radg);
 
  193                $this->form->addItem($op2);
 
  197        $this->form->setFormAction($ilCtrl->getFormAction($this, 
'performSearch'));
 
  208        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  210        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  212        $form->setOpenTag(
false);
 
  213        $form->setCloseTag(
false);
 
  218        $form->addItem($radg);
 
  221        include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
 
  223        $ti->setSelectText(
$lng->txt(
"search_select_search_area"));
 
  225        $ti->readFromSession();
 
  229        if (isset(
$_POST[
"root_id"])) {
 
  230            $ti->setValue(
$_POST[
"root_id"]);
 
  231            $ti->writeToSession();
 
  233        $form->setFormAction($ilCtrl->getFormAction($this, 
'performSearch'));
 
  245        if (method_exists($this, $a_cmd)) {
 
  258        $this->favourites->add($this->
user->getId(), (
int) 
$_GET[
"item_ref_id"]);
 
  259        $this->showSavedResults();
 
  267        $this->favourites->remove($this->
user->getId(), (
int) 
$_GET[
"item_ref_id"]);
 
  268        $this->showSavedResults();
 
  274    public function delete()
 
  285        $this->showSavedResults();
 
  290        $this->showSavedResults();
 
  295        $this->showSavedResults();
 
  303        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  305        $admin->performDelete();
 
  313        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  323        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  330        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  337        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  339        $admin->showLinkIntoMultipleObjectsTree();
 
  344        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  346        $admin->showPasteTree();
 
  351        include_once 
'./Services/Administration/classes/class.ilAdministrationCommandGUI.php';
 
  353        $admin->performPasteIntoMultipleObjects();
 
  359        $this->ctrl->redirect($this);
 
  365        $this->ctrl->redirect($this);
 
  370        $_SESSION[
"il_cont_admin_panel"] = 
false;
 
  371        $this->ctrl->redirect($this);
 
  379        $this->ctrl->redirect($this);
 
  388        $ilLocator->addItem($this->lng->txt(
'search'), $this->ctrl->getLinkTarget($this));
 
  389        $this->tpl->setLocator();
 
  405        $_SESSION[
"$a_session_key"] = max(
$_SESSION[
"$a_session_key"], $this->search_cache->getResultPageNumber());
 
  412        if ($this->search_cache->getResultPageNumber() > 1) {
 
  413            $this->ctrl->setParameter($this, 
'page_number', $this->search_cache->getResultPageNumber() - 1);
 
  419            $this->prev_link = $this->ctrl->getLinkTarget($this, 
'performSearch');
 
  422            if (
$i == $this->search_cache->getResultPageNumber()) {
 
  430            $this->ctrl->setParameter($this, 
'page_number', 
$i);
 
  431            $link = 
'<a href="' . $this->ctrl->getLinkTarget($this, 
'performSearch') . 
'" /a>' . 
$i . 
'</a> ';
 
  440            $this->ctrl->setParameter($this, 
'page_number', $this->search_cache->getResultPageNumber() + 1);
 
  446            $this->next_link = $this->ctrl->getLinkTarget($this, 
'performSearch');
 
  454        $this->ctrl->clearParameters($this);
 
  465        $tree = 
$DIC[
'tree'];
 
  469        foreach ($path_arr as 
$data) {
 
  472                $path .= 
$data[
'title'];
 
  474                $path .= $this->lng->txt(
'repository');
 
  485        $q = $_REQUEST[
"term"];
 
  486        include_once(
"./Services/Search/classes/class.ilSearchAutoComplete.php");
 
  495        $options = $this->search_cache->getCreationFilter();
 
  497        include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  499        $form->setOpenTag(
false);
 
  500        $form->setCloseTag(
false);
 
  503        $enabled->setValue(1);
 
  504        $enabled->setChecked((
bool) $options[
'enabled']);
 
  505        $form->addItem($enabled);
 
  507        #$group = new ilRadioGroupInputGUI('', 'screation_type'); 
  508        #$group->setValue((int) $options['type']); 
  509        #$group->addOption($opt1 = new ilRadioOption($this->lng->txt('search_filter_date'), 1)); 
  512        $limit_sel->setValue($options[
'ontype']);
 
  513        $limit_sel->setOptions(
 
  515                    1 => $this->lng->txt(
'search_created_after'),
 
  516                    2 => $this->lng->txt(
'search_created_before'),
 
  517                    3 => $this->lng->txt(
'search_created_on')
 
  520        $enabled->addSubItem($limit_sel);
 
  523        if ($options[
'date']) {
 
  529        $ds->setRequired(
true);
 
  531        $enabled->addSubItem($ds);
 
  533        #$group->addOption($opt2 = new ilRadioOption($this->lng->txt('search_filter_duration'), 2)); 
  535        #$duration = new ilDurationInputGUI($this->lng->txt('search_filter_duration'), 'screation_duration'); 
  536        #$duration->setMonths((int) $options['duration']['MM']); 
  537        #$duration->setDays((int) $options['duration']['dd']); 
  538        #$duration->setShowMonths(true); 
  539        #$duration->setShowDays(true); 
  540        #$duration->setShowHours(false); 
  541        #$duration->setShowMinutes(false); 
  542        #$duration->setTitle($this->lng->txt('search_newer_than')); 
  543        #$opt2->addSubItem($duration); 
  545        #$enabled->addSubItem($group); 
  547        $form->setFormAction(
$GLOBALS[
'DIC'][
'ilCtrl']->getFormAction($this, 
'performSearch'));
 
  558        return $this->search_cache;
 
  567        if (!$this->
settings->isDateFilterEnabled()) {
 
  574        if ($form->checkInput()) {
 
  575            $options[
'enabled'] = $form->getInput(
'screation');
 
  576            $options[
'type'] = $form->getInput(
'screation_type');
 
  577            $options[
'ontype'] = $form->getInput(
'screation_ontype');
 
  578            $options[
'date'] = $form->getItemByPostVar(
'screation_date')->getDate()->get(
IL_CAL_UNIX);
 
  579            $options[
'duration'] = $form->getInput(
'screation_duration');
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
Handles Administration commands (cut, delete paste)
This class represents an option in a checkbox group.
Manages favourites, currently the interface for other components, needs discussion.
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
This class represents an option in a radio group.
static getList($a_str)
Get completion list.
__construct()
Constructor @access public.
initStandardSearchForm($a_mode)
Init standard search form.
disableAdministrationPanel()
Disable administration panel.
enableAdministrationPanel()
Enable administration panel.
addPager($result, $a_session_key)
Add Pager.
getSearchCache()
Get user search cache.
showPasteTree()
Target selection cut.
getSearchAreaForm()
Init standard search form.
cut()
Interface ilAdministrationCommandHandler.
performPasteIntoMultipleObjects()
Perform paste into multiple objects.
link()
Interface ilAdministrationCommandHandler.
cancelMoveLinkObject()
Cancel move/link.
showLinkIntoMultipleObjectsTree()
Target selection link.
loadCreationFilter()
Load creation date filter.
keepObjectsInClipboardObject()
cancel action but keep objects in clipboardvoid
autoComplete()
Data resource for autoComplete.
performDelete()
Delete objects.
const SEARCH_FORM_STANDARD
addToDeskObject()
Interface methods.
cancelDelete()
Cancel delete.
removeFromDeskObject()
Remove from dektop.
buildSearchAreaPath($a_root_node)
Build path for search area.
handleCommand($a_cmd)
Handle command.
static infoPanel($a_keep=true)
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
redirection script todo: (a better solution should control the processing via a xml file)