Inheritance diagram for ilObjSearchSettingsGUI:
Collaboration diagram for ilObjSearchSettingsGUI:Public Member Functions | |
| ilObjSearchSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true) | |
| Constructor public. | |
| & | executeCommand () |
| execute command | |
| cancelObject () | |
| settingsObject () | |
| Show settings public. | |
| saveSettingsObject () | |
| Save settings public. | |
| getAdminTabs (&$tabs_gui) | |
| administration tabs show only permissions and trash folder | |
| getTabs (&$tabs_gui) | |
| get tabs public | |
Definition at line 38 of file class.ilObjSearchSettingsGUI.php.
| ilObjSearchSettingsGUI::cancelObject | ( | ) |
Definition at line 79 of file class.ilObjSearchSettingsGUI.php.
References ilUtil::sendInfo().
{
ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
$this->ctrl->redirect($this, "settings");
}
Here is the call graph for this function:| & ilObjSearchSettingsGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 52 of file class.ilObjSearchSettingsGUI.php.
References $cmd, $ret, and ilObjectGUI::prepareOutput().
{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if($cmd == "" || $cmd == "view")
{
$cmd = "settings";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}
Here is the call graph for this function:| ilObjSearchSettingsGUI::getAdminTabs | ( | &$ | tabs_gui | ) |
administration tabs show only permissions and trash folder
Reimplemented from ilObjectGUI.
Definition at line 187 of file class.ilObjSearchSettingsGUI.php.
References getTabs().
{
$this->getTabs($tabs_gui);
}
Here is the call graph for this function:| ilObjSearchSettingsGUI::getTabs | ( | &$ | tabs_gui | ) |
get tabs public
| object | tabs gui object |
Reimplemented from ilObjectGUI.
Definition at line 197 of file class.ilObjSearchSettingsGUI.php.
Referenced by getAdminTabs().
{
global $rbacsystem;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "settings"), array("settings","", "view"), "", "");
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}
Here is the caller graph for this function:| ilObjSearchSettingsGUI::ilObjSearchSettingsGUI | ( | $ | a_data, | |
| $ | a_id, | |||
| $ | a_call_by_reference, | |||
| $ | a_prepare_output = true | |||
| ) |
Constructor public.
Definition at line 44 of file class.ilObjSearchSettingsGUI.php.
References ilObjectGUI::ilObjectGUI().
{
$this->type = "seas";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$this->lng->loadLanguageModule('search');
}
Here is the call graph for this function:| ilObjSearchSettingsGUI::saveSettingsObject | ( | ) |
Save settings public.
Definition at line 154 of file class.ilObjSearchSettingsGUI.php.
References ilUtil::sendInfo().
{
include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
global $rbacsystem;
if(!$rbacsystem->checkAccess('write',$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initSettingsObject();
$this->object->settings_obj->setMaxHits((int) $_POST['max_hits']);
$this->object->settings_obj->enableIndex($_POST['search_index']);
$this->object->settings_obj->enableLucene($_POST['search_lucene']);
$rpc_settings =& new ilRPCServerSettings();
if($this->object->settings_obj->enabledLucene() and !$rpc_settings->pingServer())
{
ilUtil::sendInfo($this->lng->txt('search_no_connection_lucene'),true);
$this->ctrl->redirect($this,'settings');
return false;
}
$this->object->settings_obj->update();
ilUtil::sendInfo($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'settings');
return true;
}
Here is the call graph for this function:| ilObjSearchSettingsGUI::settingsObject | ( | ) |
Show settings public.
Definition at line 89 of file class.ilObjSearchSettingsGUI.php.
References ilUtil::formRadioButton(), ilUtil::formSelect(), and ilUtil::prepareFormOutput().
{
global $rbacsystem;
include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
$rpc_settings =& new ilRPCServerSettings();
if(!$rbacsystem->checkAccess('read',$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initSettingsObject();
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.seas_settings.html','Services/Search');
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_SEAS_TITLE",$this->lng->txt('seas_settings'));
// Max hits
$this->tpl->setVariable("TXT_MAX_HITS",$this->lng->txt('seas_max_hits'));
$this->tpl->setVariable("TXT_MAX_HITS_INFO",$this->lng->txt('seas_max_hits_info'));
for($i = 10; $i <= 100; $i += 10)
{
$max_hits[$i] = $i;
}
$this->tpl->setVariable('SELECT_MAX_HITS',ilUtil::formSelect($this->object->settings_obj->getMaxHits(),
'max_hits',
$max_hits,false,true));
$this->tpl->setVariable("TXT_DIRECT",$this->lng->txt('search_direct'));
$this->tpl->setVariable("TXT_INDEX",$this->lng->txt('search_index'));
$this->tpl->setVariable("TXT_TYPE",$this->lng->txt('search_type'));
$this->tpl->setVariable("TXT_LIKE_INFO",$this->lng->txt('search_like_info'));
$this->tpl->setVariable("TXT_FULL_INFO",$this->lng->txt('search_full_info'));
$this->tpl->setVariable("RADIO_TYPE_LIKE",ilUtil::formRadioButton($this->object->settings_obj->enabledIndex() ? 0 : 1,
'search_index',0));
$this->tpl->setVariable("RADIO_TYPE_FULL",ilUtil::formRadioButton($this->object->settings_obj->enabledIndex() ? 1 : 0,
'search_index',1));
// Lucene
$this->tpl->setVariable("TXT_LUCENE",$this->lng->txt('search_lucene'));
$this->tpl->setVariable("TXT_LUCENE_INFO",$this->lng->txt('search_lucene_info'));
$this->tpl->setVariable("CHECK_TYPE_LUCENE",ilUtil::formCheckBox($this->object->settings_obj->enabledLucene() ? 1 : 0,
'search_lucene',1));
$this->tpl->setVariable("LUCENE_HOST",ilUtil::prepareFormOutput($rpc_settings->getHost()));
$this->tpl->setVariable("LUCENE_PORT",ilUtil::prepareFormOutput($rpc_settings->getPort()));
$this->tpl->setVariable("CMD_SUBMIT",'saveSettings');
$this->tpl->setVariable("TXT_SUBMIT",$this->lng->txt('save'));
$this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
return true;
}
Here is the call graph for this function:
1.7.1