ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMembershipAdministrationGUI Class Reference

Membership Administration Settings. More...

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

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
 editSettings (?ilPropertyFormGUI $a_form=null)
 
 saveSettings ()
 
 addToExternalSettingsForm (int $a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 getType ()
 
 getParentObjType ()
 
 getAdministrationFormId ()
 
 addChildContentsTo (ilPropertyFormGUI $form)
 
 saveChildSettings (ilPropertyFormGUI $form)
 
 getChildSettingsInfo (int $a_form_id)
 
 initFormSettings ()
 
 addFieldsToForm (ilPropertyFormGUI $a_form)
 
 save (ilPropertyFormGUI $a_form)
 
 setSubTabs (string $a_main_tab, string $a_active_tab)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

const SUB_TAB_GENERAL_SETTINGS = 'settings'
 
const SUB_TAB_PRINT_VIEW = 'print_view'
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References ILIAS\GlobalScreen\Provider\__construct(), addChildContentsTo(), getAdministrationFormId(), getChildSettingsInfo(), getParentObjType(), getType(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and saveChildSettings().

32  {
33  $this->type = $this->getType();
34  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
35 
36  $this->lng->loadLanguageModule("grp");
37  $this->lng->loadLanguageModule('mem');
38  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addChildContentsTo()

ilMembershipAdministrationGUI::addChildContentsTo ( ilPropertyFormGUI  $form)
abstractprotected

Referenced by __construct(), and initFormSettings().

+ Here is the caller graph for this function:

◆ addFieldsToForm()

ilMembershipAdministrationGUI::addFieldsToForm ( ilPropertyFormGUI  $a_form)
protected

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

Referenced by ilObjStudyProgrammeAdminGUI\initFormSettings(), and initFormSettings().

221  : void
222  {
223  }
+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm ( int  $a_form_id)

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

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

194  : array
195  {
196  switch ($a_form_id) {
198 
199  $this->lng->loadLanguageModule("mail");
200 
201  $fields = array(
202  'mail_enable_' . $this->getParentObjType() . '_member_notification' => array(
203  $this->settings->get('mail_' . $this->getParentObjType() . '_member_notification', '1'),
205  ),
206  'mail_enable_' . $this->getParentObjType() . '_admin_notification' => array(
207  $this->settings->get('mail_' . $this->getParentObjType() . '_admin_notification', '1'),
209  )
210  );
211  return [
212  [
213  "editSettings",
214  $fields
215  ]
216  ];
217  }
218  return $this->getChildSettingsInfo($a_form_id);
219  }
getChildSettingsInfo(int $a_form_id)
+ Here is the call graph for this function:

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ?ilPropertyFormGUI  $a_form = null)

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

References initFormSettings(), null, and setSubTabs().

Referenced by saveSettings().

112  : void
113  {
114  $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
115  $this->tabs_gui->setTabActive('settings');
116 
117  if ($a_form === null) {
118  $a_form = $this->initFormSettings();
119  }
120  $this->tpl->setContent($a_form->getHTML());
121  }
setSubTabs(string $a_main_tab, string $a_active_tab)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMembershipAdministrationGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl(), getParentObjType(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ilUserActionAdminGUI\setActionContext(), and setSubTabs().

52  : void
53  {
54  $next_class = $this->ctrl->getNextClass($this);
55  $cmd = $this->ctrl->getCmd();
56 
57  $this->prepareOutput();
58 
59  if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
60  $this->error->raiseError($this->lng->txt("no_permission"), $this->error->WARNING);
61  }
62 
63  switch ($next_class) {
64  case 'ilpermissiongui':
65  $this->tabs_gui->setTabActive("perm_settings");
66  $perm_gui = new ilPermissionGUI($this);
67  $this->ctrl->forwardCommand($perm_gui);
68  break;
69 
70  case 'ilmemberexportsettingsgui':
71  $this->setSubTabs('settings', self::SUB_TAB_PRINT_VIEW);
72  $settings_gui = new ilMemberExportSettingsGUI($this->getParentObjType());
73  $this->ctrl->forwardCommand($settings_gui);
74  break;
75 
76  case 'iluseractionadmingui':
77  $gui = new ilUserActionAdminGUI($this->object->getRefId());
79  $this->setSubTabs('settings', "actions");
80  $this->ctrl->forwardCommand($gui);
81  break;
82 
83  default:
84  if (!$cmd || $cmd === "view") {
85  $cmd = "editSettings";
86  }
87  $this->$cmd();
88  break;
89  }
90  }
setSubTabs(string $a_main_tab, string $a_active_tab)
User action administration GUI class.
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setActionContext(?ilUserActionContext $a_val=null)
+ Here is the call graph for this function:

◆ getAdministrationFormId()

ilMembershipAdministrationGUI::getAdministrationFormId ( )
abstractprotected

Referenced by __construct(), and initFormSettings().

+ Here is the caller graph for this function:

◆ getAdminTabs()

ilMembershipAdministrationGUI::getAdminTabs ( )

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

References ILIAS\Repository\ctrl().

92  : void
93  {
94  if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
95  $this->tabs_gui->addTarget(
96  "settings",
97  $this->ctrl->getLinkTarget($this, "editSettings"),
98  array("editSettings", "view")
99  );
100  }
101 
102  if ($this->rbac_system->checkAccess("edit_permission", $this->object->getRefId())) {
103  $this->tabs_gui->addTarget(
104  "perm_settings",
105  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"),
106  array(),
107  "ilpermissiongui"
108  );
109  }
110  }
+ Here is the call graph for this function:

◆ getChildSettingsInfo()

ilMembershipAdministrationGUI::getChildSettingsInfo ( int  $a_form_id)
abstractprotected

Referenced by __construct(), and addToExternalSettingsForm().

+ Here is the caller graph for this function:

◆ getParentObjType()

ilMembershipAdministrationGUI::getParentObjType ( )
abstractprotected

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

+ Here is the caller graph for this function:

◆ getType()

ilMembershipAdministrationGUI::getType ( )
abstractprotected

Referenced by __construct().

+ Here is the caller graph for this function:

◆ initFormSettings()

ilMembershipAdministrationGUI::initFormSettings ( )
protected

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

References ILIAS\Repository\access(), addChildContentsTo(), ilPropertyFormGUI\addCommandButton(), ilAdministrationSettingsFormHandler\addFieldsToForm(), addFieldsToForm(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), getAdministrationFormId(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ILIAS\Repository\settings(), and ilPropertyFormGUI\setTitle().

Referenced by editSettings(), and saveSettings().

150  {
151  $form = new ilPropertyFormGUI();
152  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
153  $form->setTitle($this->lng->txt("settings"));
154 
155  $this->addFieldsToForm($form);
156 
157  $this->lng->loadLanguageModule("mail");
158 
160  $this->getAdministrationFormId(),
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(
171  $this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification'),
172  'mail_member_notification'
173  );
174  $cn->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification_info'));
175  $cn->setChecked((bool) $this->settings->get('mail_' . $this->getParentObjType() . '_member_notification', '1'));
176  $form->addItem($cn);
177 
178  // default admin membership notification
179  $an = new ilCheckboxInputGUI(
180  $this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification'),
181  'mail_admin_notification'
182  );
183  $an->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification_info'));
184  $an->setChecked((bool) $this->settings->get('mail_' . $this->getParentObjType() . '_admin_notification', '1'));
185  $form->addItem($an);
186 
187  if ($this->access->checkAccess("write", "", $this->object->getRefId())) {
188  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
189  $form->addCommandButton("view", $this->lng->txt("cancel"));
190  }
191  return $this->addChildContentsTo($form);
192  }
addChildContentsTo(ilPropertyFormGUI $form)
static addFieldsToForm(int $a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
+ 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 225 of file class.ilMembershipAdministrationGUI.php.

Referenced by saveSettings().

225  : bool
226  {
227  return true;
228  }
+ Here is the caller graph for this function:

◆ saveChildSettings()

ilMembershipAdministrationGUI::saveChildSettings ( ilPropertyFormGUI  $form)
abstractprotected

Referenced by __construct(), and saveSettings().

+ Here is the caller graph for this function:

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

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

References ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), editSettings(), ilPropertyFormGUI\getInput(), getParentObjType(), initFormSettings(), ILIAS\Repository\lng(), save(), saveChildSettings(), ILIAS\Repository\settings(), and ilPropertyFormGUI\setValuesByPost().

123  : void
124  {
125  $this->checkPermission("write");
126  $form = $this->initFormSettings();
127  if ($form->checkInput()) {
128  if ($this->save($form)) {
129  $this->settings->set(
130  'mail_' . $this->getParentObjType() . '_member_notification',
131  (string) $form->getInput('mail_member_notification')
132  );
133 
134  $this->settings->set(
135  'mail_' . $this->getParentObjType() . '_admin_notification',
136  (string) $form->getInput('mail_admin_notification')
137  );
138 
139  $this->saveChildSettings($form);
140 
141  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
142  $this->ctrl->redirect($this, "editSettings");
143  }
144  }
145  $form->setValuesByPost();
146  $this->editSettings($form);
147  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
editSettings(?ilPropertyFormGUI $a_form=null)
saveChildSettings(ilPropertyFormGUI $form)
+ Here is the call graph for this function:

◆ setSubTabs()

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

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by editSettings(), and executeCommand().

230  : void
231  {
232  if ($a_main_tab === 'settings') {
233  $this->tabs_gui->addSubTab(
234  self::SUB_TAB_GENERAL_SETTINGS,
235  $this->lng->txt('mem_settings_tab_' . self::SUB_TAB_GENERAL_SETTINGS),
236  $this->ctrl->getLinkTarget($this, 'editSettings')
237  );
238  $this->tabs_gui->addSubTab(
239  self::SUB_TAB_PRINT_VIEW,
240  $this->lng->txt('mem_settings_tab_' . self::SUB_TAB_PRINT_VIEW),
241  $this->ctrl->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
242  );
243  $this->tabs_gui->addSubTab(
244  "actions",
245  $this->lng->txt("mmbr_gallery_user_actions"),
246  $this->ctrl->getLinkTargetByClass("iluseractionadmingui")
247  );
248 
249  $this->tabs_gui->activateTab($a_main_tab);
250  $this->tabs_gui->activateSubTab($a_active_tab);
251  }
252  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ SUB_TAB_GENERAL_SETTINGS

const ilMembershipAdministrationGUI::SUB_TAB_GENERAL_SETTINGS = 'settings'
protected

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

◆ SUB_TAB_PRINT_VIEW

const ilMembershipAdministrationGUI::SUB_TAB_PRINT_VIEW = 'print_view'
protected

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


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