ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
 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
 
 $ilias
 
 $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 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...
 
 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...
 
 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
 $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.

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

Referenced by initFormSettings().

200  {
201 
202  }
+ Here is the caller graph for this function:

◆ addToExternalSettingsForm()

ilMembershipAdministrationGUI::addToExternalSettingsForm (   $a_form_id)

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

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

181  {
182  global $ilSetting;
183 
184  switch($a_form_id)
185  {
187 
188  $this->lng->loadLanguageModule("mail");
189 
190  $fields = array(
191  'mail_enable_'.$this->getParentObjType().'_member_notification' => array($ilSetting->get('mail_'.$this->getParentObjType().'_member_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL),
192  'mail_enable_'.$this->getParentObjType().'_admin_notification' => array($ilSetting->get('mail_'.$this->getParentObjType().'_admin_notification', true), ilAdministrationSettingsFormHandler::VALUE_BOOL)
193  );
194 
195  return array(array("editSettings", $fields));
196  }
197  }
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ editSettings()

ilMembershipAdministrationGUI::editSettings ( ilPropertyFormGUI  $a_form = null)

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

References initFormSettings(), and setSubTabs().

Referenced by saveSettings().

97  {
98  $this->setSubTabs('settings', self::SUB_TAB_GENERAL_SETTINGS);
99  $this->tabs_gui->setTabActive('settings');
100 
101  if(!$a_form)
102  {
103  $a_form = $this->initFormSettings();
104  }
105  $this->tpl->setContent($a_form->getHTML());
106  return true;
107  }
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 $cmd, $ilErr, getParentObjType(), ilObjectGUI\prepareOutput(), and setSubTabs().

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  {
47  $ilErr->raiseError($this->lng->txt("no_permission"), $ilErr->WARNING);
48  }
49 
50  switch($next_class)
51  {
52  case 'ilpermissiongui':
53  $this->tabs_gui->setTabActive("perm_settings");
54  include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
55  $perm_gui = new ilPermissionGUI($this);
56  $this->ctrl->forwardCommand($perm_gui);
57  break;
58 
59  case 'ilmemberexportsettingsgui':
60  $this->setSubTabs('settings', self::SUB_TAB_PRINT_VIEW);
61  include_once './Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
62  $settings_gui = new ilMemberExportSettingsGUI($this->getParentObjType());
63  $this->ctrl->forwardCommand($settings_gui);
64  break;
65 
66  default:
67  if(!$cmd || $cmd == "view")
68  {
69  $cmd = "editSettings";
70  }
71  $this->$cmd();
72  break;
73  }
74  return true;
75  }
setSubTabs($a_main_tab, $a_active_tab)
Set sub tabs.
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35
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 77 of file class.ilMembershipAdministrationGUI.php.

References array.

78  {
79  global $rbacsystem;
80 
81  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId()))
82  {
83  $this->tabs_gui->addTarget("settings",
84  $this->ctrl->getLinkTarget($this, "editSettings"),
85  array("editSettings", "view"));
86  }
87 
88  if ($rbacsystem->checkAccess("edit_permission", $this->object->getRefId()))
89  {
90  $this->tabs_gui->addTarget("perm_settings",
91  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"),
92  array(), "ilpermissiongui");
93  }
94  }
Create styles array
The data for the language used.

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

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

Referenced by editSettings(), and saveSettings().

136  {
137  global $ilSetting, $ilAccess;
138 
139  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
140  $form = new ilPropertyFormGUI();
141  $form->setFormAction($this->ctrl->getFormAction($this, "saveSettings"));
142  $form->setTitle($this->lng->txt("settings"));
143 
144  $this->addFieldsToForm($form);
145 
146  $this->lng->loadLanguageModule("mail");
147 
148 
150  $this->getAdministrationFormId(),
151  $form,
152  $this
153  );
154 
155  $sec = new ilFormSectionHeaderGUI();
156  $sec->setTitle($this->lng->txt('mail_notification_membership_section'));
157  $form->addItem($sec);
158 
159  // member notification
160  $cn = new ilCheckboxInputGUI($this->lng->txt('mail_enable_'.$this->getParentObjType().'_member_notification'), 'mail_member_notification');
161  $cn->setInfo($this->lng->txt('mail_enable_'.$this->getParentObjType().'_member_notification_info'));
162  $cn->setChecked($ilSetting->get('mail_'.$this->getParentObjType().'_member_notification', true));
163  $form->addItem($cn);
164 
165  // default admin membership notification
166  $an = new ilCheckboxInputGUI($this->lng->txt('mail_enable_'.$this->getParentObjType().'_admin_notification'), 'mail_admin_notification');
167  $an->setInfo($this->lng->txt('mail_enable_'.$this->getParentObjType().'_admin_notification_info'));
168  $an->setChecked($ilSetting->get('mail_'.$this->getParentObjType().'_admin_notification', true));
169  $form->addItem($an);
170 
171  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
172  {
173  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
174  $form->addCommandButton("view", $this->lng->txt("cancel"));
175  }
176 
177  return $form;
178  }
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)
setInfo($a_info)
Set Information Text.
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 204 of file class.ilMembershipAdministrationGUI.php.

Referenced by saveSettings().

205  {
206  return true;
207  }
+ Here is the caller graph for this function:

◆ saveSettings()

ilMembershipAdministrationGUI::saveSettings ( )

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

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

110  {
111  global $ilSetting;
112 
113  $this->checkPermission("write");
114 
115  $form = $this->initFormSettings();
116  if($form->checkInput())
117  {
118  if($this->save($form))
119  {
120  $ilSetting->set('mail_'.$this->getParentObjType().'_member_notification',
121  (int)$form->getInput('mail_member_notification'));
122 
123  $ilSetting->set('mail_'.$this->getParentObjType().'_admin_notification',
124  (int)$form->getInput('mail_admin_notification'));
125 
126  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
127  $this->ctrl->redirect($this, "editSettings");
128  }
129  }
130 
131  $form->setValuesByPost();
132  $this->editSettings($form);
133  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
editSettings(ilPropertyFormGUI $a_form=null)
+ 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 214 of file class.ilMembershipAdministrationGUI.php.

References $GLOBALS.

Referenced by editSettings(), and executeCommand().

215  {
216  if($a_main_tab == 'settings')
217  {
218  $GLOBALS['ilTabs']->addSubTab(
219  self::SUB_TAB_GENERAL_SETTINGS,
220  $GLOBALS['lng']->txt('mem_settings_tab_'.self::SUB_TAB_GENERAL_SETTINGS),
221  $GLOBALS['ilCtrl']->getLinkTarget($this,'editSettings')
222  );
223  $GLOBALS['ilTabs']->addSubTab(
224  self::SUB_TAB_PRINT_VIEW,
225  $GLOBALS['lng']->txt('mem_settings_tab_'.self::SUB_TAB_PRINT_VIEW),
226  $GLOBALS['ilCtrl']->getLinkTargetByClass('ilMemberExportSettingsGUI', 'printViewSettings')
227  );
228 
229  $GLOBALS['ilTabs']->activateTab($a_main_tab);
230  $GLOBALS['ilTabs']->activateSubTab($a_active_tab);
231  }
232  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ 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: