ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSearchController Class Reference
+ Collaboration diagram for ilSearchController:

Public Member Functions

 ilSearchController ()
 Constructor public.
 getLastClass ()
 setLastClass ($a_class)
executeCommand ()

Data Fields

const TYPE_USER_SEARCH = -1
 $ctrl = null
 $ilias = null
 $lng = null

Detailed Description

Definition at line 18 of file class.ilSearchController.php.

Member Function Documentation

& ilSearchController::executeCommand ( )

Definition at line 65 of file class.ilSearchController.php.

References ilSearchSettings\_getSearchSettingRefId(), getLastClass(), and setLastClass().

{
global $rbacsystem;
include_once 'Services/Search/classes/class.ilSearchSettings.php';
// Check hacks
if(!$rbacsystem->checkAccess('search',ilSearchSettings::_getSearchSettingRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$forward_class = $this->ctrl->getNextClass($this) ? $this->ctrl->getNextClass($this) : $this->getLastClass();
switch($forward_class)
{
case 'illucenesearchgui':
$this->setLastClass('illucenesearchgui');
include_once './Services/Search/classes/Lucene/class.ilLuceneSearchGUI.php';
$this->ctrl->forwardCommand(new ilLuceneSearchGUI());
break;
case 'illuceneadvancedsearchgui':
$this->setLastClass('illuceneadvancedsearchgui');
include_once './Services/Search/classes/Lucene/class.ilLuceneAdvancedSearchGUI.php';
$this->ctrl->forwardCommand(new ilLuceneAdvancedSearchGUI());
break;
case 'illuceneusersearchgui':
$this->setLastClass('illuceneusersearchgui');
include_once './Services/Search/classes/Lucene/class.ilLuceneUserSearchGUI.php';
$this->ctrl->forwardCommand(new ilLuceneUserSearchGUI());
break;
case 'iladvancedsearchgui':
// Remember last class
$this->setLastClass('iladvancedsearchgui');
include_once 'Services/Search/classes/class.ilAdvancedSearchGUI.php';
$this->ctrl->forwardCommand(new ilAdvancedSearchGUI());
break;
case 'ilsearchgui':
// Remember last class
$this->setLastClass('ilsearchgui');
default:
include_once 'Services/Search/classes/class.ilSearchGUI.php';
$search_gui = new ilSearchGUI();
$this->ctrl->forwardCommand($search_gui);
break;
}
$this->tpl->show();
return true;
}

+ Here is the call graph for this function:

ilSearchController::getLastClass ( )

Definition at line 40 of file class.ilSearchController.php.

References $_REQUEST, $_SESSION, ilSearchSettings\getInstance(), and setLastClass().

Referenced by executeCommand().

{
include_once './Services/Search/classes/class.ilSearchSettings.php';
if(ilSearchSettings::getInstance()->enabledLucene())
{
$default = 'illucenesearchgui';
}
else
{
$default = 'ilsearchgui';
}
if($_REQUEST['root_id'] == self::TYPE_USER_SEARCH)
{
$default = 'illuceneusersearchgui';
}
$this->setLastClass($default);
return $_SESSION['search_last_class'] ? $_SESSION['search_last_class'] : $default;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchController::ilSearchController ( )

Constructor public.

Definition at line 30 of file class.ilSearchController.php.

References $ilCtrl, $ilias, $lng, and $tpl.

{
$this->ilias = $ilias;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->tpl = $tpl;
}
ilSearchController::setLastClass (   $a_class)

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

References $_SESSION.

Referenced by executeCommand(), and getLastClass().

{
$_SESSION['search_last_class'] = $a_class;
}

+ Here is the caller graph for this function:

Field Documentation

ilSearchController::$ctrl = null

Definition at line 22 of file class.ilSearchController.php.

ilSearchController::$ilias = null

Definition at line 23 of file class.ilSearchController.php.

Referenced by ilSearchController().

ilSearchController::$lng = null

Definition at line 24 of file class.ilSearchController.php.

Referenced by ilSearchController().

const ilSearchController::TYPE_USER_SEARCH = -1

Definition at line 20 of file class.ilSearchController.php.


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