ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 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...
 

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...
 
 showMountWebfolderIcon ()
 
 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
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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 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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addFieldsToForm()

ilMembershipAdministrationGUI::addFieldsToForm ( ilPropertyFormGUI  $a_form)
protected

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

Referenced by initFormSettings().

220  {
221  }
+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm (   $a_form_id)

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

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

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

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ilPropertyFormGUI  $a_form = null)

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

References initFormSettings(), and setSubTabs().

Referenced by saveSettings().

111  {
112  $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
113  $this->tabs_gui->setTabActive('settings');
114 
115  if (!$a_form) {
116  $a_form = $this->initFormSettings();
117  }
118  $this->tpl->setContent($a_form->getHTML());
119  return true;
120  }
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, ilObjectGUI\$ilErr, getParentObjType(), ilObjectGUI\prepareOutput(), and setSubTabs().

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

References $DIC.

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

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

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

Referenced by editSettings(), and saveSettings().

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

Referenced by saveSettings().

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

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

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

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

123  {
124  global $DIC;
125 
126  $ilSetting = $DIC['ilSetting'];
127 
128  $this->checkPermission("write");
129 
130  $form = $this->initFormSettings();
131  if ($form->checkInput()) {
132  if ($this->save($form)) {
133  $ilSetting->set(
134  'mail_' . $this->getParentObjType() . '_member_notification',
135  (int) $form->getInput('mail_member_notification')
136  );
137 
138  $ilSetting->set(
139  'mail_' . $this->getParentObjType() . '_admin_notification',
140  (int) $form->getInput('mail_admin_notification')
141  );
142 
143  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
144  $this->ctrl->redirect($this, "editSettings");
145  }
146  }
147 
148  $form->setValuesByPost();
149  $this->editSettings($form);
150  }
global $DIC
Definition: saml.php:7
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
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 233 of file class.ilMembershipAdministrationGUI.php.

References $GLOBALS.

Referenced by editSettings(), and executeCommand().

234  {
235  if ($a_main_tab == 'settings') {
236  $GLOBALS['DIC']['ilTabs']->addSubTab(
237  self::SUB_TAB_GENERAL_SETTINGS,
238  $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_GENERAL_SETTINGS),
239  $GLOBALS['DIC']['ilCtrl']->getLinkTarget($this, 'editSettings')
240  );
241  $GLOBALS['DIC']['ilTabs']->addSubTab(
242  self::SUB_TAB_PRINT_VIEW,
243  $GLOBALS['DIC']['lng']->txt('mem_settings_tab_' . self::SUB_TAB_PRINT_VIEW),
244  $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
245  );
246  $GLOBALS['DIC']['ilTabs']->addSubTab(
247  "actions",
248  $GLOBALS['DIC']['lng']->txt("mmbr_gallery_user_actions"),
249  $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass("iluseractionadmingui")
250  );
251 
252  $GLOBALS['DIC']['ilTabs']->activateTab($a_main_tab);
253  $GLOBALS['DIC']['ilTabs']->activateSubTab($a_active_tab);
254  }
255  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ 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: