ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjNotificationAdminGUI Class Reference

GUI class for notification objects. More...

+ Inheritance diagram for ilObjNotificationAdminGUI:
+ Collaboration diagram for ilObjNotificationAdminGUI:

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 setTabs ()
 set admin tabs @access public More...
 
 __initSubTabs ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 showGeneralSettingsObject ($form=null)
 
 saveGeneralSettingsObject ()
 
 showTypesObject ()
 
 showChannelsObject ()
 
 saveTypesObject ()
 
 saveChannelsObject ()
 
 showConfigMatrixObject ()
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _forwards ()
 
static saveObject2 ($params=array())
 save object More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Private Member Functions

 saveConfigMatrixObject ()
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

GUI class for notification objects.

Author
Jan Posselt jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjNotificationAdminGUI: ilPermissionGUI @ilCtrl_IsCalledBy ilObjNotificationAdminGUI: ilAdministrationGUI

Definition at line 19 of file class.ilObjNotificationAdminGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjNotificationAdminGUI::__construct (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor @access public.

Definition at line 25 of file class.ilObjNotificationAdminGUI.php.

26 {
27 $this->type = "nota";
28 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
29 $this->lng->loadLanguageModule('notification');
30 }

Member Function Documentation

◆ __initSubTabs()

ilObjNotificationAdminGUI::__initSubTabs ( )

Definition at line 107 of file class.ilObjNotificationAdminGUI.php.

108 {
109 $this->tabs_gui->addSubTabTarget(
110 "notification_general",
111 $this->ctrl->getLinkTargetByClass('ilObjNotificationAdminGUI', "showGeneralSettings")
112 );
113
114 $this->tabs_gui->addSubTabTarget(
115 "notification_admin_types",
116 $this->ctrl->getLinkTargetByClass('ilObjNotificationAdminGUI', "showTypes")
117 );
118
119 $this->tabs_gui->addSubTabTarget(
120 "notification_admin_matrix",
121 $this->ctrl->getLinkTargetByClass('ilObjNotificationAdminGUI', "showConfigMatrix")
122 );
123 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ _forwards()

static ilObjNotificationAdminGUI::_forwards ( )
static

Definition at line 32 of file class.ilObjNotificationAdminGUI.php.

33 {
34 return array();
35 }

◆ addLocatorItems()

ilObjNotificationAdminGUI::addLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 125 of file class.ilObjNotificationAdminGUI.php.

126 {
127 if (is_object($this->object)) {
128 $this->locator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $_GET["ref_id"]);
129 }
130 }
$_GET["client_id"]

References $_GET.

◆ executeCommand()

ilObjNotificationAdminGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 37 of file class.ilObjNotificationAdminGUI.php.

38 {
39 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd();
41
42 $this->prepareOutput();
43
44 switch ($next_class) {
45 case 'ilpermissiongui':
46 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
47 $perm_gui = new ilPermissionGUI($this);
48 $ret = &$this->ctrl->forwardCommand($perm_gui);
49 break;
50
51 default:
52 $this->__initSubTabs();
53 $this->tabs_gui->activateTab("view");
54
55 if (empty($cmd) || $cmd == 'view') {
56 $cmd = 'showTypes';
57 }
58
59 $cmd .= "Object";
60 $this->$cmd();
61 break;
62 }
63 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, __initSubTabs(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ saveChannelsObject()

ilObjNotificationAdminGUI::saveChannelsObject ( )

Definition at line 225 of file class.ilObjNotificationAdminGUI.php.

226 {
227 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
228 foreach ($_REQUEST['notifications'] as $type => $value) {
230 }
231 $this->showChannelsObject();
232 }
static setConfigTypeForChannel($channel_name, $config_name)
$type

References $type, ilNotificationDatabaseHandler\setConfigTypeForChannel(), and showChannelsObject().

+ Here is the call graph for this function:

◆ saveConfigMatrixObject()

ilObjNotificationAdminGUI::saveConfigMatrixObject ( )
private

Definition at line 253 of file class.ilObjNotificationAdminGUI.php.

254 {
255 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
256
257 ilNotificationDatabaseHandler::setUserConfig(-1, $_REQUEST['notification'] ? $_REQUEST['notification'] : array());
258 $this->showConfigMatrixObject();
259 }
static setUserConfig($userid, array $configArray)
Sets the configuration for all given configurations.

References ilNotificationDatabaseHandler\setUserConfig(), and showConfigMatrixObject().

+ Here is the call graph for this function:

◆ saveGeneralSettingsObject()

ilObjNotificationAdminGUI::saveGeneralSettingsObject ( )
Todo:
dirty...

push all notifiation settings to the form to enable custom settings per channel

Definition at line 156 of file class.ilObjNotificationAdminGUI.php.

157 {
158 require_once 'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
159
160 $settings = new ilSetting('notifications');
161
163 $form->setValuesByPost();
164 if (!$form->checkInput()) {
166 } else {
173 $values = $form->store_values;//array('enable_osd', 'osd_polling_intervall', 'enable_mail');
174
175 // handle custom channel settings
176 foreach ($values as $v) {
177 $settings->set($v, $_POST[$v]);
178 }
179
180 foreach ($_REQUEST['notifications'] as $type => $value) {
182 }
183
185 }
186 }
$_POST["username"]
ILIAS Setting Class.
if(isset($_POST['submit'])) $form
$values

References $_POST, $form, ilObjectGUI\$settings, $type, $values, ilNotificationAdminSettingsForm\getGeneralSettingsForm(), ilNotificationDatabaseHandler\setConfigTypeForChannel(), and showGeneralSettingsObject().

+ Here is the call graph for this function:

◆ saveObject2()

static ilObjNotificationAdminGUI::saveObject2 (   $params = array())
static

save object

@access public

Definition at line 70 of file class.ilObjNotificationAdminGUI.php.

71 {
72 global $objDefinition, $ilUser;
73
74 // create and insert file in grp_tree
75 require_once 'Services/Notifications/classes/class.ilObjNotificationAdmin.php';
76 $fileObj = new ilObjNotificationAdmin();
77 $fileObj->setTitle('notification admin');
78 $fileObj->create();
79 $fileObj->createReference();
80 $fileObj->putInTree(SYSTEM_FOLDER_ID);
81 //$fileObj->setPermissions($params['ref_id']);
82 // upload file to filesystem
83 }
Class ilObjNotificationAdmin.
$ilUser
Definition: imgupload.php:18

References $ilUser, and ilObjectGUI\$objDefinition.

◆ saveTypesObject()

ilObjNotificationAdminGUI::saveTypesObject ( )

Definition at line 216 of file class.ilObjNotificationAdminGUI.php.

217 {
218 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
219 foreach ($_REQUEST['notifications'] as $type => $value) {
221 }
222 $this->showTypesObject();
223 }
static setConfigTypeForType($type_name, $config_name)

References $type, ilNotificationDatabaseHandler\setConfigTypeForType(), and showTypesObject().

+ Here is the call graph for this function:

◆ setTabs()

ilObjNotificationAdminGUI::setTabs ( )

set admin tabs @access public

Reimplemented from ilObjectGUI.

Definition at line 85 of file class.ilObjNotificationAdminGUI.php.

86 {
87 $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
88
89 if ($this->access->checkAccess("visible", "", $this->ref_id)) {
90 $this->ilTabs->addTab(
91 "id_info",
92 $this->lng->txt("info_short"),
93 $this->ctrl->getLinkTargetByClass(array("ilobjfilegui", "ilinfoscreengui"), "showSummary")
94 );
95 }
96
97 if ($this->access->checkAccess("edit_permission", "", $this->ref_id)) {
98 $this->tabs_gui->addTab(
99 "id_permissions",
100 $this->lng->txt("perm_settings"),
101 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
102 );
103 }
104 }

◆ showChannelsObject()

ilObjNotificationAdminGUI::showChannelsObject ( )

Definition at line 202 of file class.ilObjNotificationAdminGUI.php.

203 {
204 $this->tabs_gui->activateSubTab('notification_admin_channels');
205
206 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
207 require_once 'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
208
210 $form->setFormAction($this->ctrl->getFormAction($this, 'showChannels'));
211 $form->addCommandButton('saveChannels', $this->lng->txt('save'));
212 $form->addCommandButton('showChannels', $this->lng->txt('cancel'));
213 $this->tpl->setContent($form->getHtml());
214 }
static getAvailableChannels($config_types=array(), $includeDisabled=false)

References $form, ilNotificationDatabaseHandler\getAvailableChannels(), and ilNotificationAdminSettingsForm\getChannelForm().

Referenced by saveChannelsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showConfigMatrixObject()

ilObjNotificationAdminGUI::showConfigMatrixObject ( )

Definition at line 234 of file class.ilObjNotificationAdminGUI.php.

235 {
236 $this->tabs_gui->activateSubTab('notification_admin_matrix');
237
238 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
239 require_once 'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
240
242
244 $table->setFormAction($this->ctrl->getFormAction($this, 'saveConfigMatrix'));
246 $table->setDescription($this->lng->txt('notification_admin_matrix_settings_table_desc'));
247 $table->addCommandButton('saveConfigMatrix', $this->lng->txt('save'));
248 $table->addCommandButton('showConfigMatrix', $this->lng->txt('cancel'));
249
250 $this->tpl->setContent($table->getHtml());
251 }
if(empty($password)) $table
Definition: pwgen.php:24

References $table, ilNotificationDatabaseHandler\getAvailableChannels(), ilNotificationDatabaseHandler\getAvailableTypes(), and ilNotificationDatabaseHandler\loadUserConfig().

Referenced by saveConfigMatrixObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showGeneralSettingsObject()

ilObjNotificationAdminGUI::showGeneralSettingsObject (   $form = null)
Todo:
dirty...

push all notifiation settings to the form to enable custom settings per channel

Definition at line 132 of file class.ilObjNotificationAdminGUI.php.

133 {
134 require_once 'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
135
136 if ($form == null) {
138 $settings = new ilSetting('notifications');
139
146 $form->setValuesByArray(array_merge($settings->getAll(), $form->restored_values));
147 }
148
149 $form->setFormAction($this->ctrl->getFormAction($this, 'saveGeneralSettings'));
150 $form->addCommandButton('saveGeneralSettings', 'save');
151 $form->addCommandButton('showGeneralSettings', 'cancel');
152
153 $this->tpl->setContent($form->getHtml());
154 }

References $form, ilObjectGUI\$settings, and ilNotificationAdminSettingsForm\getGeneralSettingsForm().

Referenced by saveGeneralSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTypesObject()

ilObjNotificationAdminGUI::showTypesObject ( )

Definition at line 188 of file class.ilObjNotificationAdminGUI.php.

189 {
190 $this->tabs_gui->activateSubTab('notification_admin_types');
191
192 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
193 require_once 'Services/Notifications/classes/class.ilNotificationAdminSettingsForm.php';
194
196 $form->setFormAction($this->ctrl->getFormAction($this, 'showTypes'));
197 $form->addCommandButton('saveTypes', $this->lng->txt('save'));
198 $form->addCommandButton('showTypes', $this->lng->txt('cancel'));
199 $this->tpl->setContent($form->getHtml());
200 }

References $form, ilNotificationDatabaseHandler\getAvailableTypes(), and ilNotificationAdminSettingsForm\getTypeForm().

Referenced by saveTypesObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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