ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 getAdminTabs ()
 
 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 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 ()
 
 removeFromDeskObject ()
 

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
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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.

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

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  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addFieldsToForm()

ilMembershipAdministrationGUI::addFieldsToForm ( ilPropertyFormGUI  $a_form)
protected

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

Referenced by initFormSettings().

216  {
217  }
+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm (   $a_form_id)

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

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

196  {
197  global $DIC;
198 
199  $ilSetting = $DIC['ilSetting'];
200 
201  switch ($a_form_id) {
203 
204  $this->lng->loadLanguageModule("mail");
205 
206  $fields = array(
207  'mail_enable_' . $this->getParentObjType() . '_member_notification' => array($ilSetting->get('mail_' . $this->getParentObjType() . '_member_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL),
208  'mail_enable_' . $this->getParentObjType() . '_admin_notification' => array($ilSetting->get('mail_' . $this->getParentObjType() . '_admin_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL)
209  );
210 
211  return array(array("editSettings", $fields));
212  }
213  }
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ilPropertyFormGUI  $a_form = null)

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

References initFormSettings(), and setSubTabs().

Referenced by saveSettings().

107  {
108  $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
109  $this->tabs_gui->setTabActive('settings');
110 
111  if (!$a_form) {
112  $a_form = $this->initFormSettings();
113  }
114  $this->tpl->setContent($a_form->getHTML());
115  return true;
116  }
setSubTabs($a_main_tab, $a_active_tab)
Set sub tabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMembershipAdministrationGUI::executeCommand ( )

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

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

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

References $DIC, and ilObjectGUI\$rbacsystem.

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

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

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

Referenced by editSettings(), and saveSettings().

149  {
150  global $DIC;
151 
152  $ilSetting = $DIC['ilSetting'];
153  $ilAccess = $DIC['ilAccess'];
154 
155  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
156  $form = new ilPropertyFormGUI();
157  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
158  $form->setTitle($this->lng->txt("settings"));
159 
160  $this->addFieldsToForm($form);
161 
162  $this->lng->loadLanguageModule("mail");
163 
164 
166  $this->getAdministrationFormId(),
167  $form,
168  $this
169  );
170 
171  $sec = new ilFormSectionHeaderGUI();
172  $sec->setTitle($this->lng->txt('mail_notification_membership_section'));
173  $form->addItem($sec);
174 
175  // member notification
176  $cn = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification'), 'mail_member_notification');
177  $cn->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_member_notification_info'));
178  $cn->setChecked($ilSetting->get('mail_' . $this->getParentObjType() . '_member_notification', true));
179  $form->addItem($cn);
180 
181  // default admin membership notification
182  $an = new ilCheckboxInputGUI($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification'), 'mail_admin_notification');
183  $an->setInfo($this->lng->txt('mail_enable_' . $this->getParentObjType() . '_admin_notification_info'));
184  $an->setChecked($ilSetting->get('mail_' . $this->getParentObjType() . '_admin_notification', true));
185  $form->addItem($an);
186 
187  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
188  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
189  $form->addCommandButton("view", $this->lng->txt("cancel"));
190  }
191 
192  return $form;
193  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
+ 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 219 of file class.ilMembershipAdministrationGUI.php.

Referenced by saveSettings().

220  {
221  return true;
222  }
+ Here is the caller graph for this function:

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

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

References $DIC, $ilSetting, ilObjectGUI\checkPermission(), editSettings(), getParentObjType(), initFormSettings(), and save().

119  {
120  global $DIC;
121 
122  $ilSetting = $DIC['ilSetting'];
123 
124  $this->checkPermission("write");
125 
126  $form = $this->initFormSettings();
127  if ($form->checkInput()) {
128  if ($this->save($form)) {
129  $ilSetting->set(
130  'mail_' . $this->getParentObjType() . '_member_notification',
131  (int) $form->getInput('mail_member_notification')
132  );
133 
134  $ilSetting->set(
135  'mail_' . $this->getParentObjType() . '_admin_notification',
136  (int) $form->getInput('mail_admin_notification')
137  );
138 
139  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
140  $this->ctrl->redirect($this, "editSettings");
141  }
142  }
143 
144  $form->setValuesByPost();
145  $this->editSettings($form);
146  }
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ 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 229 of file class.ilMembershipAdministrationGUI.php.

References $GLOBALS.

Referenced by editSettings(), and executeCommand().

230  {
231  if ($a_main_tab == 'settings') {
232  $GLOBALS['DIC']['ilTabs']->addSubTab(
233  self::SUB_TAB_GENERAL_SETTINGS,
234  $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_GENERAL_SETTINGS),
235  $GLOBALS['DIC']['ilCtrl']->getLinkTarget($this, 'editSettings')
236  );
237  $GLOBALS['DIC']['ilTabs']->addSubTab(
238  self::SUB_TAB_PRINT_VIEW,
239  $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_PRINT_VIEW),
240  $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
241  );
242  $GLOBALS['DIC']['ilTabs']->addSubTab(
243  "actions",
244  $GLOBALS['DIC']['lng']->txt("mmbr_gallery_user_actions"),
245  $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass("iluseractionadmingui")
246  );
247 
248  $GLOBALS['DIC']['ilTabs']->activateTab($a_main_tab);
249  $GLOBALS['DIC']['ilTabs']->activateSubTab($a_active_tab);
250  }
251  }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ 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: