ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

const SUB_TAB_GENERAL_SETTINGS = 'settings'
 
const SUB_TAB_PRINT_VIEW = 'print_view'
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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 ()
 
 addChildContentsTo ($form)
 
 saveChildSettings ($form)
 
 getChildSettingsInfo ($a_form_id)
 
 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
 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...
 
 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
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 20 of file class.ilMembershipAdministrationGUI.php.

21 {
22 $this->type = $this->getType();
23
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 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), and getType().

+ Here is the call graph for this function:

Member Function Documentation

◆ addChildContentsTo()

ilMembershipAdministrationGUI::addChildContentsTo (   $form)
abstractprotected
Parameters
ilPropertyFormGUI$form
Returns
ilPropertyFormGUI

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by initFormSettings().

+ Here is the caller graph for this function:

◆ addFieldsToForm()

ilMembershipAdministrationGUI::addFieldsToForm ( ilPropertyFormGUI  $a_form)
protected

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

226 {
227 }

Referenced by initFormSettings().

+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm (   $a_form_id)

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

209 {
210 switch ($a_form_id) {
212
213 $this->lng->loadLanguageModule("mail");
214
215 $fields = array(
216 'mail_enable_' . $this->getParentObjType() . '_member_notification' => array($this->settings->get('mail_' . $this->getParentObjType() . '_member_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL),
217 'mail_enable_' . $this->getParentObjType() . '_admin_notification' => array($this->settings->get('mail_' . $this->getParentObjType() . '_admin_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL)
218 );
219
220 return array(array("editSettings", $fields));
221 }
222 return $this->getChildSettingsInfo($a_form_id);
223 }
settings()
Definition: settings.php:2

References ilAdministrationSettingsFormHandler\FORM_MAIL, getChildSettingsInfo(), getParentObjType(), settings(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ilPropertyFormGUI  $a_form = null)

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

124 {
125 $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
126 $this->tabs_gui->setTabActive('settings');
127
128 if (!$a_form) {
129 $a_form = $this->initFormSettings();
130 }
131 $this->tpl->setContent($a_form->getHTML());
132 return true;
133 }
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 53 of file class.ilMembershipAdministrationGUI.php.

54 {
55 global $DIC;
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
58
59 $this->prepareOutput();
60
61 if (!$DIC->rbac()->system()->checkAccess("visible,read", $this->object->getRefId())) {
62 $DIC['ilErr']->raiseError($this->lng->txt("no_permission"), $DIC['ilErr']->WARNING);
63 }
64
65 switch ($next_class) {
66 case 'ilpermissiongui':
67 $this->tabs_gui->setTabActive("perm_settings");
68 include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
69 $perm_gui = new ilPermissionGUI($this);
70 $this->ctrl->forwardCommand($perm_gui);
71 break;
72
73 case 'ilmemberexportsettingsgui':
74 $this->setSubTabs('settings', self::SUB_TAB_PRINT_VIEW);
75 include_once './Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
76 $settings_gui = new ilMemberExportSettingsGUI($this->getParentObjType());
77 $this->ctrl->forwardCommand($settings_gui);
78 break;
79
80 case 'iluseractionadmingui':
81 include_once("./Services/User/Actions/classes/class.ilUserActionAdminGUI.php");
82 include_once("./Services/User/Gallery/classes/class.ilGalleryUserActionContext.php");
83 $gui = new ilUserActionAdminGUI();
84 $gui->setActionContext(new ilGalleryUserActionContext());
85 $this->setSubTabs('settings', "actions");
86 $this->ctrl->forwardCommand($gui);
87 break;
88
89 default:
90 if (!$cmd || $cmd == "view") {
91 $cmd = "editSettings";
92 }
93 $this->$cmd();
94 break;
95 }
96 return true;
97 }
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.
global $DIC
Definition: goto.php:24

References $DIC, 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 99 of file class.ilMembershipAdministrationGUI.php.

100 {
101 global $DIC;
102
103 $rbacsystem = $DIC['rbacsystem'];
104
105 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
106 $this->tabs_gui->addTarget(
107 "settings",
108 $this->ctrl->getLinkTarget($this, "editSettings"),
109 array("editSettings", "view")
110 );
111 }
112
113 if ($rbacsystem->checkAccess("edit_permission", $this->object->getRefId())) {
114 $this->tabs_gui->addTarget(
115 "perm_settings",
116 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"),
117 array(),
118 "ilpermissiongui"
119 );
120 }
121 }

References $DIC, and ilObjectGUI\$rbacsystem.

◆ getChildSettingsInfo()

ilMembershipAdministrationGUI::getChildSettingsInfo (   $a_form_id)
abstractprotected
Parameters
int$a_form_id
Returns
null|array

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by addToExternalSettingsForm().

+ Here is the caller graph for this function:

◆ 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 163 of file class.ilMembershipAdministrationGUI.php.

164 {
165 global $DIC;
166
167
168 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
169 $form = new ilPropertyFormGUI();
170 $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
171 $form->setTitle($this->lng->txt("settings"));
172
173 $this->addFieldsToForm($form);
174
175 $this->lng->loadLanguageModule("mail");
176
177
180 $form,
181 $this
182 );
183
184 $sec = new ilFormSectionHeaderGUI();
185 $sec->setTitle($this->lng->txt('mail_notification_membership_section'));
186 $form->addItem($sec);
187
188 // member notification
189 $cn = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification'), 'mail_member_notification');
190 $cn->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification_info'));
191 $cn->setChecked($this->settings->get('mail_' . $this->getParentObjType() . '_member_notification', true));
192 $form->addItem($cn);
193
194 // default admin membership notification
195 $an = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification'), 'mail_admin_notification');
196 $an->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification_info'));
197 $an->setChecked($this->settings->get('mail_' . $this->getParentObjType() . '_admin_notification', true));
198 $form->addItem($an);
199
200 if ($this->access->checkAccess("write", "", $this->object->getRefId())) {
201 $form->addCommandButton("saveSettings", $this->lng->txt("save"));
202 $form->addCommandButton("view", $this->lng->txt("cancel"));
203 }
204
205 return $this->addChildContentsTo($form);
206 }
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.

References $DIC, addChildContentsTo(), ilAdministrationSettingsFormHandler\addFieldsToForm(), addFieldsToForm(), getAdministrationFormId(), and settings().

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 229 of file class.ilMembershipAdministrationGUI.php.

230 {
231 return true;
232 }

Referenced by saveSettings().

+ Here is the caller graph for this function:

◆ saveChildSettings()

ilMembershipAdministrationGUI::saveChildSettings (   $form)
abstractprotected
Parameters
ilPropertyFormGUI$form

Reimplemented in ilObjCourseAdministrationGUI, and ilObjGroupAdministrationGUI.

Referenced by saveSettings().

+ Here is the caller graph for this function:

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

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

136 {
137 $this->checkPermission("write");
138
139 $form = $this->initFormSettings();
140 if ($form->checkInput()) {
141 if ($this->save($form)) {
142 $this->settings->set(
143 'mail_' . $this->getParentObjType() . '_member_notification',
144 (int) $form->getInput('mail_member_notification')
145 );
146
147 $this->settings->set(
148 'mail_' . $this->getParentObjType() . '_admin_notification',
149 (int) $form->getInput('mail_admin_notification')
150 );
151
152 $this->saveChildSettings($form);
153
154 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
155 $this->ctrl->redirect($this, "editSettings");
156 }
157 }
158
159 $form->setValuesByPost();
160 $this->editSettings($form);
161 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\checkPermission(), editSettings(), getParentObjType(), initFormSettings(), save(), saveChildSettings(), and settings().

+ 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 239 of file class.ilMembershipAdministrationGUI.php.

240 {
241 if ($a_main_tab == 'settings') {
242 $GLOBALS['DIC']['ilTabs']->addSubTab(
243 self::SUB_TAB_GENERAL_SETTINGS,
244 $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_GENERAL_SETTINGS),
245 $GLOBALS['DIC']['ilCtrl']->getLinkTarget($this, 'editSettings')
246 );
247 $GLOBALS['DIC']['ilTabs']->addSubTab(
248 self::SUB_TAB_PRINT_VIEW,
249 $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_PRINT_VIEW),
250 $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
251 );
252 $GLOBALS['DIC']['ilTabs']->addSubTab(
253 "actions",
254 $GLOBALS['DIC']['lng']->txt("mmbr_gallery_user_actions"),
255 $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass("iluseractionadmingui")
256 );
257
258 $GLOBALS['DIC']['ilTabs']->activateTab($a_main_tab);
259 $GLOBALS['DIC']['ilTabs']->activateSubTab($a_active_tab);
260 }
261 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

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: