News Settings. More...
Inheritance diagram for ilObjPersonalDesktopSettingsGUI:
Collaboration diagram for ilObjPersonalDesktopSettingsGUI:Public Member Functions | |
| __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true) | |
| Contructor. | |
| executeCommand () | |
| Execute command. | |
| getAdminTabs () | |
| Get tabs. | |
| editSettings () | |
| Edit news settings. | |
| saveSettings () | |
| Save news and external webfeeds settings. | |
Static Private Attributes | |
| static | $ERROR_MESSAGE |
News Settings.
ilObjPersonalDesktopSettingsGUI: ilPermissionGUI
Definition at line 36 of file class.ilObjPersonalDesktopSettingsGUI.php.
| ilObjPersonalDesktopSettingsGUI::__construct | ( | $ | a_data, | |
| $ | a_id, | |||
| $ | a_call_by_reference = true, |
|||
| $ | a_prepare_output = true | |||
| ) |
Contructor.
public
Definition at line 44 of file class.ilObjPersonalDesktopSettingsGUI.php.
References ilObjectGUI::$lng, and ilObjectGUI::ilObjectGUI().
{
global $lng;
$this->type = 'pdts';
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$lng->loadLanguageModule("pd");
}
Here is the call graph for this function:| ilObjPersonalDesktopSettingsGUI::editSettings | ( | ) |
Edit news settings.
Definition at line 123 of file class.ilObjPersonalDesktopSettingsGUI.php.
References $ilCtrl, $ilSetting, and ilObjectGUI::$lng.
{
global $ilCtrl, $lng, $ilSetting;
$pd_set = new ilSetting("pd");
$enable_calendar = $ilSetting->get("enable_calendar");
$enable_block_moving = $pd_set->get("enable_block_moving");
$enable_active_users = $ilSetting->get("block_activated_pdusers");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("pd_settings"));
// Enable calendar
$cb_prop = new ilCheckboxInputGUI($lng->txt("enable_calendar"), "enable_calendar");
$cb_prop->setValue("1");
//$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
$cb_prop->setChecked($enable_calendar);
$form->addItem($cb_prop);
// Enable bookmarks
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_bookmarks"), "enable_bookmarks");
$cb_prop->setValue("1");
$cb_prop->setChecked(($ilSetting->get("disable_bookmarks") ? "0" : "1"));
$form->addItem($cb_prop);
// Enable notes
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_notes"), "enable_notes");
$cb_prop->setValue("1");
$cb_prop->setChecked(($ilSetting->get("disable_notes") ? "0" : "1"));
$form->addItem($cb_prop);
// Enable block moving
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_block_moving"),
"enable_block_moving");
$cb_prop->setValue("1");
$cb_prop->setInfo($lng->txt("pd_enable_block_moving_info"));
$cb_prop->setChecked($enable_block_moving);
$form->addItem($cb_prop);
// Enable active users block
$cb_prop = new ilCheckboxInputGUI($lng->txt("pd_enable_active_users"),
"block_activated_pdusers");
$cb_prop->setValue("1");
$cb_prop->setChecked($enable_active_users);
// maximum inactivity time
$ti_prop = new ilTextInputGUI($lng->txt("pd_time_before_removal"),
"time_removal");
$ti_prop->setValue($pd_set->get("user_activity_time"));
$ti_prop->setInfo($lng->txt("pd_time_before_removal_info"));
$ti_prop->setMaxLength(3);
$ti_prop->setSize(3);
$cb_prop->addSubItem($ti_prop);
// osi host
// see http://www.onlinestatus.org
$ti_prop = new ilTextInputGUI($lng->txt("pd_osi_host"),
"osi_host");
$ti_prop->setValue($pd_set->get("osi_host"));
$ti_prop->setInfo($lng->txt("pd_osi_host_info").
' <a href="http://www.onlinestatus.org" target="_blank">http://www.onlinestatus.org</a>');
$cb_prop->addSubItem($ti_prop);
$form->addItem($cb_prop);
// command buttons
$form->addCommandButton("saveSettings", $lng->txt("save"));
$form->addCommandButton("view", $lng->txt("cancel"));
$this->tpl->setContent($form->getHTML());
}
| ilObjPersonalDesktopSettingsGUI::executeCommand | ( | ) |
Execute command.
public
Reimplemented from ilObjectGUI.
Definition at line 60 of file class.ilObjPersonalDesktopSettingsGUI.php.
References $cmd, $ilErr, $ret, and ilObjectGUI::prepareOutput().
{
global $rbacsystem,$ilErr,$ilAccess;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
}
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd || $cmd == 'view')
{
$cmd = "editSettings";
}
$this->$cmd();
break;
}
return true;
}
Here is the call graph for this function:| ilObjPersonalDesktopSettingsGUI::getAdminTabs | ( | ) |
Get tabs.
public
Definition at line 101 of file class.ilObjPersonalDesktopSettingsGUI.php.
{
global $rbacsystem, $ilAccess;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->tabs_gui->addTarget("pd_settings",
$this->ctrl->getLinkTarget($this, "editSettings"),
array("editSettings", "view"));
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
array(),'ilpermissiongui');
}
}
| ilObjPersonalDesktopSettingsGUI::saveSettings | ( | ) |
Save news and external webfeeds settings.
Definition at line 201 of file class.ilObjPersonalDesktopSettingsGUI.php.
References $ilCtrl, $ilSetting, and ilUtil::sendInfo().
{
global $ilCtrl, $ilSetting;
$pd_set = new ilSetting("pd");
$ilSetting->set("enable_calendar", $_POST["enable_calendar"]);
$ilSetting->set("disable_bookmarks", (int) ($_POST["enable_bookmarks"] ? 0 : 1));
$ilSetting->set("disable_notes", (int) ($_POST["enable_notes"] ? 0 : 1));
$ilSetting->set("block_activated_pdusers", $_POST["block_activated_pdusers"]);
$pd_set->set("enable_block_moving", $_POST["enable_block_moving"]);
$pd_set->set("user_activity_time", (int) $_POST["time_removal"]);
$pd_set->set("osi_host", $_POST["osi_host"]);
ilUtil::sendInfo($this->lng->txt("settings_saved"),true);
$ilCtrl->redirect($this, "view");
}
Here is the call graph for this function:ilObjPersonalDesktopSettingsGUI::$ERROR_MESSAGE [static, private] |
Definition at line 38 of file class.ilObjPersonalDesktopSettingsGUI.php.
1.7.1