4 require_once
'Services/Object/classes/class.ilObject2GUI.php';
5 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
20 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
22 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
23 $this->lng->loadLanguageModule(
'buddysystem');
40 $this->tabs_gui->addTarget(
'settings', $this->ctrl->getLinkTarget($this,
'showConfigurationForm'),
array(
'',
'view',
'showConfigurationForm',
'saveConfigurationForm'), __CLASS__);
44 $this->tabs_gui->addTarget(
'perm_settings', $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
'perm'),
array(
'perm',
'info',
'owner'),
'ilpermissiongui');
53 $next_class = $this->ctrl->getNextClass($this);
54 $cmd = $this->ctrl->getCmd();
57 switch ($next_class) {
58 case 'ilpermissiongui':
59 require_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
61 $this->ctrl->forwardCommand($perm_gui);
65 if ($cmd ==
'' || $cmd ==
'view') {
66 $cmd =
'showConfigurationForm';
78 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
80 $form->setTitle($this->lng->txt(
'settings'));
81 $form->setFormAction($this->ctrl->getFormAction($this,
'saveConfigurationForm'));
85 $enabled->setInfo($this->lng->txt(
'buddy_enable_info'));
90 $notification->setInfo($this->lng->txt(
'buddy_use_osd_info'));
92 $enabled->addSubItem($notification);
94 $form->addItem($enabled);
97 $form->addCommandButton(
'saveConfigurationForm', $this->lng->txt(
'save'));
111 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
117 'use_osd' => isset(
$cfg[
'buddysystem_request']) && array_search(
'osd',
$cfg[
'buddysystem_request']) !==
false 121 $this->tpl->setContent(
$form->getHTML());
132 if (!
$form->checkInput()) {
133 $form->setValuesByPost();
140 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
146 foreach ($channels as $channel) {
147 $new_cfg[
$type][$channel] =
true;
151 if (!isset($new_cfg[
'buddysystem_request']) || !is_array($new_cfg[
'buddysystem_request'])) {
152 $new_cfg[
'buddysystem_request'] =
array();
155 if ((
bool)
$form->getInput(
'use_osd') && !array_key_exists(
'osd', $new_cfg[
'buddysystem_request'])) {
156 $new_cfg[
'buddysystem_request'][
'osd'] =
true;
157 } elseif (!(
bool)
$form->getInput(
'use_osd') && array_key_exists(
'osd', $new_cfg[
'buddysystem_request'])) {
158 $new_cfg[
'buddysystem_request'][
'osd'] =
false;
164 $this->ctrl->redirect($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
if(isset($_POST['submit'])) $form
catch(Exception $e) if(isset($_POST['cancel'])) if(isset($_POST['continue'])) $cfg
Create styles array
The data for the language used.
static setUserConfig($userid, array $configArray)
Sets the configuration for all given configurations.
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static loadUserConfig($userid)