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');
41 $this->tabs_gui->addTarget(
'settings', $this->ctrl->getLinkTarget($this,
'showConfigurationForm'),
array(
'',
'view',
'showConfigurationForm',
'saveConfigurationForm'), __CLASS__);
46 $this->tabs_gui->addTarget(
'perm_settings', $this->ctrl->getLinkTargetByClass(
array(get_class($this),
'ilpermissiongui'),
'perm'),
array(
'perm',
'info',
'owner'),
'ilpermissiongui');
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
61 case 'ilpermissiongui':
62 require_once
'Services/AccessControl/classes/class.ilPermissionGUI.php';
64 $this->ctrl->forwardCommand($perm_gui);
70 $cmd =
'showConfigurationForm';
82 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
84 $form->setTitle($this->lng->txt(
'settings'));
85 $form->setFormAction($this->ctrl->getFormAction($this,
'saveConfigurationForm'));
89 $enabled->setInfo($this->lng->txt(
'buddy_enable_info'));
94 $notification->setInfo($this->lng->txt(
'buddy_use_osd_info'));
96 $enabled->addSubItem($notification);
98 $form->addItem($enabled);
100 $form->addCommandButton(
'saveConfigurationForm', $this->lng->txt(
'save'));
114 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
118 $form->setValuesByArray(
array(
120 'use_osd' => isset($cfg[
'buddysystem_request']) && array_search(
'osd', $cfg[
'buddysystem_request']) !==
false 124 $this->tpl->setContent($form->getHTML());
135 if(!$form->checkInput())
137 $form->setValuesByPost();
144 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
148 foreach($cfg as $type => $channels)
150 $new_cfg[$type] =
array();
151 foreach($channels as $channel)
153 $new_cfg[$type][$channel] =
true;
157 if(!isset($new_cfg[
'buddysystem_request']) || !is_array($new_cfg[
'buddysystem_request']))
159 $new_cfg[
'buddysystem_request'] =
array();
162 if((
bool)$form->getInput(
'use_osd') && !array_key_exists(
'osd', $new_cfg[
'buddysystem_request']))
164 $new_cfg[
'buddysystem_request'][
'osd'] =
true;
166 else if(!(
bool)$form->getInput(
'use_osd') && array_key_exists(
'osd', $new_cfg[
'buddysystem_request']))
168 $new_cfg[
'buddysystem_request'][
'osd'] =
false;
174 $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.
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)