ILIAS  Release_3_10_x_branch Revision 61812
 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

 $ctrl = null
 $ilias = null
 $lng = null

Detailed Description

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

Member Function Documentation

& ilSearchController::executeCommand ( )

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

References ilSearchSettings\_getSearchSettingRefId(), getLastClass(), ilUtil\redirect(), ilUtil\sendInfo(), and setLastClass().

{
global $rbacsystem,$ilUser;
// Check for incomplete profile
if($ilUser->getProfileIncomplete())
{
ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
}
// check whether password of user have to be changed due to first login
if( $ilUser->isPasswordChangeDemanded() )
{
ilUtil::sendInfo( $this->lng->txt('password_change_on_first_login_demand'), true );
ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
}
// check whether password of user is expired
if( $ilUser->isPasswordExpired() )
{
$msg = $this->lng->txt('password_expired');
$password_age = $ilUser->getPasswordAge();
ilUtil::sendInfo( sprintf($msg,$password_age), true );
ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
}
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 'ilsearchresultgui':
// Remember last class
$this->setLastClass('ilsearchresultgui');
include_once 'Services/Search/classes/class.ilSearchResultGUI.php';
$this->ctrl->forwardCommand(new ilSearchResultGUI());
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 56 of file class.ilSearchController.php.

References $_SESSION.

Referenced by executeCommand().

{
return $_SESSION['search_last_class'] ? $_SESSION['search_last_class'] : 'ilsearchgui';
}

+ Here is the caller graph for this function:

ilSearchController::ilSearchController ( )

Constructor public.

Definition at line 46 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().

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

+ Here is the caller graph for this function:

Field Documentation

ilSearchController::$ctrl = null

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

ilSearchController::$ilias = null

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

Referenced by ilSearchController().

ilSearchController::$lng = null

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

Referenced by ilSearchController().


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