ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMembershipAdministrationGUI Class Reference

Membership Administration Settings. More...

+ Inheritance diagram for ilMembershipAdministrationGUI:
+ Collaboration diagram for ilMembershipAdministrationGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 
 executeCommand ()
 execute command More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 editSettings (ilPropertyFormGUI $a_form=null)
 
 saveSettings ()
 
 addToExternalSettingsForm ($a_form_id)
 
- 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...
 

Data Fields

const SUB_TAB_GENERAL_SETTINGS = 'settings'
 
const SUB_TAB_PRINT_VIEW = 'print_view'
 
- 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

 getType ()
 
 getParentObjType ()
 
 getAdministrationFormId ()
 
 initFormSettings ()
 
 addFieldsToForm (ilPropertyFormGUI $a_form)
 
 save (ilPropertyFormGUI $a_form)
 
 setSubTabs ($a_main_tab, $a_active_tab)
 Set sub tabs. More...
 
- Protected Member Functions inherited from ilObjectGUI
 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...
 

Additional Inherited Members

- 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...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Membership Administration Settings.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id:$

Definition at line 15 of file class.ilMembershipAdministrationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 21 of file class.ilMembershipAdministrationGUI.php.

22 {
23 $this->type = $this->getType();
24 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
25
26 $this->lng->loadLanguageModule("grp");
27 $this->lng->loadLanguageModule('mem');
28 }

References getType().

+ Here is the call graph for this function:

Member Function Documentation

◆ addFieldsToForm()

ilMembershipAdministrationGUI::addFieldsToForm ( ilPropertyFormGUI  $a_form)
protected

Definition at line 207 of file class.ilMembershipAdministrationGUI.php.

208 {
209 }

Referenced by initFormSettings().

+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm (   $a_form_id)

Definition at line 189 of file class.ilMembershipAdministrationGUI.php.

190 {
191 global $ilSetting;
192
193 switch ($a_form_id) {
195
196 $this->lng->loadLanguageModule("mail");
197
198 $fields = array(
199 'mail_enable_' . $this->getParentObjType() . '_member_notification' => array($ilSetting->get('mail_' . $this->getParentObjType() . '_member_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL),
200 'mail_enable_' . $this->getParentObjType() . '_admin_notification' => array($ilSetting->get('mail_' . $this->getParentObjType() . '_admin_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL)
201 );
202
203 return array(array("editSettings", $fields));
204 }
205 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, ilAdministrationSettingsFormHandler\FORM_MAIL, getParentObjType(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ilPropertyFormGUI  $a_form = null)

Definition at line 105 of file class.ilMembershipAdministrationGUI.php.

106 {
107 $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
108 $this->tabs_gui->setTabActive('settings');
109
110 if (!$a_form) {
111 $a_form = $this->initFormSettings();
112 }
113 $this->tpl->setContent($a_form->getHTML());
114 return true;
115 }
setSubTabs($a_main_tab, $a_active_tab)
Set sub tabs.

References initFormSettings(), and setSubTabs().

Referenced by saveSettings().

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

◆ executeCommand()

ilMembershipAdministrationGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 36 of file class.ilMembershipAdministrationGUI.php.

37 {
38 global $ilAccess, $ilErr;
39
40 $next_class = $this->ctrl->getNextClass($this);
41 $cmd = $this->ctrl->getCmd();
42
43 $this->prepareOutput();
44
45 if (!$ilAccess->checkAccess("read", "", $this->object->getRefId())) {
46 $ilErr->raiseError($this->lng->txt("no_permission"), $ilErr->WARNING);
47 }
48
49 switch ($next_class) {
50 case 'ilpermissiongui':
51 $this->tabs_gui->setTabActive("perm_settings");
52 include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
53 $perm_gui = new ilPermissionGUI($this);
54 $this->ctrl->forwardCommand($perm_gui);
55 break;
56
57 case 'ilmemberexportsettingsgui':
58 $this->setSubTabs('settings', self::SUB_TAB_PRINT_VIEW);
59 include_once './Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
60 $settings_gui = new ilMemberExportSettingsGUI($this->getParentObjType());
61 $this->ctrl->forwardCommand($settings_gui);
62 break;
63
64 case 'iluseractionadmingui':
65 include_once("./Services/User/Actions/classes/class.ilUserActionAdminGUI.php");
66 include_once("./Services/User/Gallery/classes/class.ilGalleryUserActionContext.php");
67 $gui = new ilUserActionAdminGUI();
68 $gui->setActionContext(new ilGalleryUserActionContext());
69 $this->setSubTabs('settings', "actions");
70 $this->ctrl->forwardCommand($gui);
71 break;
72
73 default:
74 if (!$cmd || $cmd == "view") {
75 $cmd = "editSettings";
76 }
77 $this->$cmd();
78 break;
79 }
80 return true;
81 }
Gallery context for user actions.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
User action administration GUI class.

References ilObjectGUI\$ilErr, getParentObjType(), ilObjectGUI\prepareOutput(), and setSubTabs().

+ Here is the call graph for this function:

◆ getAdministrationFormId()

ilMembershipAdministrationGUI::getAdministrationFormId ( )
abstractprotected

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by initFormSettings().

+ Here is the caller graph for this function:

◆ getAdminTabs()

ilMembershipAdministrationGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 83 of file class.ilMembershipAdministrationGUI.php.

84 {
85 global $rbacsystem;
86
87 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
88 $this->tabs_gui->addTarget(
89 "settings",
90 $this->ctrl->getLinkTarget($this, "editSettings"),
91 array("editSettings", "view")
92 );
93 }
94
95 if ($rbacsystem->checkAccess("edit_permission", $this->object->getRefId())) {
96 $this->tabs_gui->addTarget(
97 "perm_settings",
98 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"),
99 array(),
100 "ilpermissiongui"
101 );
102 }
103 }

References ilObjectGUI\$rbacsystem.

◆ getParentObjType()

ilMembershipAdministrationGUI::getParentObjType ( )
abstractprotected

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by addToExternalSettingsForm(), executeCommand(), and saveSettings().

+ Here is the caller graph for this function:

◆ getType()

ilMembershipAdministrationGUI::getType ( )
abstractprotected

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ initFormSettings()

ilMembershipAdministrationGUI::initFormSettings ( )
protected

Definition at line 145 of file class.ilMembershipAdministrationGUI.php.

146 {
147 global $ilSetting, $ilAccess;
148
149 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
150 $form = new ilPropertyFormGUI();
151 $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
152 $form->setTitle($this->lng->txt("settings"));
153
154 $this->addFieldsToForm($form);
155
156 $this->lng->loadLanguageModule("mail");
157
158
161 $form,
162 $this
163 );
164
165 $sec = new ilFormSectionHeaderGUI();
166 $sec->setTitle($this->lng->txt('mail_notification_membership_section'));
167 $form->addItem($sec);
168
169 // member notification
170 $cn = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification'), 'mail_member_notification');
171 $cn->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification_info'));
172 $cn->setChecked($ilSetting->get('mail_' . $this->getParentObjType() . '_member_notification', true));
173 $form->addItem($cn);
174
175 // default admin membership notification
176 $an = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification'), 'mail_admin_notification');
177 $an->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification_info'));
178 $an->setChecked($ilSetting->get('mail_' . $this->getParentObjType() . '_admin_notification', true));
179 $form->addItem($an);
180
181 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
182 $form->addCommandButton("saveSettings", $this->lng->txt("save"));
183 $form->addCommandButton("view", $this->lng->txt("cancel"));
184 }
185
186 return $form;
187 }
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
This class represents a property form user interface.
if(isset($_POST['submit'])) $form

References $form, $ilSetting, ilAdministrationSettingsFormHandler\addFieldsToForm(), addFieldsToForm(), and getAdministrationFormId().

Referenced by editSettings(), and saveSettings().

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

◆ save()

ilMembershipAdministrationGUI::save ( ilPropertyFormGUI  $a_form)
protected

Definition at line 211 of file class.ilMembershipAdministrationGUI.php.

212 {
213 return true;
214 }

Referenced by saveSettings().

+ Here is the caller graph for this function:

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

Definition at line 117 of file class.ilMembershipAdministrationGUI.php.

118 {
119 global $ilSetting;
120
121 $this->checkPermission("write");
122
123 $form = $this->initFormSettings();
124 if ($form->checkInput()) {
125 if ($this->save($form)) {
126 $ilSetting->set(
127 'mail_' . $this->getParentObjType() . '_member_notification',
128 (int) $form->getInput('mail_member_notification')
129 );
130
131 $ilSetting->set(
132 'mail_' . $this->getParentObjType() . '_admin_notification',
133 (int) $form->getInput('mail_admin_notification')
134 );
135
136 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
137 $this->ctrl->redirect($this, "editSettings");
138 }
139 }
140
141 $form->setValuesByPost();
142 $this->editSettings($form);
143 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $form, $ilSetting, ilObjectGUI\checkPermission(), editSettings(), getParentObjType(), initFormSettings(), save(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setSubTabs()

ilMembershipAdministrationGUI::setSubTabs (   $a_main_tab,
  $a_active_tab 
)
protected

Set sub tabs.

Parameters
string$main_tab
type$a_active_tab

Definition at line 221 of file class.ilMembershipAdministrationGUI.php.

222 {
223 if ($a_main_tab == 'settings') {
224 $GLOBALS['ilTabs']->addSubTab(
225 self::SUB_TAB_GENERAL_SETTINGS,
226 $GLOBALS['lng']->txt('mem_settings_tab_' . self::SUB_TAB_GENERAL_SETTINGS),
227 $GLOBALS['ilCtrl']->getLinkTarget($this, 'editSettings')
228 );
229 $GLOBALS['ilTabs']->addSubTab(
230 self::SUB_TAB_PRINT_VIEW,
231 $GLOBALS['lng']->txt('mem_settings_tab_' . self::SUB_TAB_PRINT_VIEW),
232 $GLOBALS['ilCtrl']->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
233 );
234 $GLOBALS['ilTabs']->addSubTab(
235 "actions",
236 $GLOBALS['lng']->txt("mmbr_gallery_user_actions"),
237 $GLOBALS['ilCtrl']->getLinkTargetByClass("iluseractionadmingui")
238 );
239
240 $GLOBALS['ilTabs']->activateTab($a_main_tab);
241 $GLOBALS['ilTabs']->activateSubTab($a_active_tab);
242 }
243 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS.

Referenced by editSettings(), and executeCommand().

+ Here is the caller graph for this function:

Field Documentation

◆ SUB_TAB_GENERAL_SETTINGS

const ilMembershipAdministrationGUI::SUB_TAB_GENERAL_SETTINGS = 'settings'

Definition at line 17 of file class.ilMembershipAdministrationGUI.php.

◆ SUB_TAB_PRINT_VIEW

const ilMembershipAdministrationGUI::SUB_TAB_PRINT_VIEW = 'print_view'

Definition at line 18 of file class.ilMembershipAdministrationGUI.php.


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