ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjForumAdministrationGUI Class Reference

Forum Administration Settings. More...

+ Inheritance diagram for ilObjForumAdministrationGUI:
+ Collaboration diagram for ilObjForumAdministrationGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor public. More...
 
 executeCommand ()
 
 editSettings (ilPropertyFormGUI $form=null)
 
- 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...
 

Protected Member Functions

 getSettingsForm ()
 
- 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...
 
- 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 Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjForumAdministrationGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor public.

Definition at line 21 of file class.ilObjForumAdministrationGUI.php.

22  {
23  $this->type = 'frma';
24  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
25  $this->lng->loadLanguageModule('forum');
26  }

Member Function Documentation

◆ editSettings()

ilObjForumAdministrationGUI::editSettings ( ilPropertyFormGUI  $form = null)
Parameters
ilPropertyFormGUI$form

Definition at line 86 of file class.ilObjForumAdministrationGUI.php.

References $ilSetting, array, ilObjectGUI\checkPermission(), ilForumProperties\FILE_UPLOAD_GLOBALLY_ALLOWED, getSettingsForm(), ilCronManager\isJobActive(), ilUtil\sendSuccess(), and ilPropertyFormGUI\setValuesByArray().

87  {
88  $this->tabs_gui->setTabActive('settings');
89 
90  if(!$form)
91  {
92  $form = $this->getSettingsForm();
93  $this->populateForm($form);
94  }
95 
96  $this->tpl->setContent($form->getHtml());
97  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjForumAdministrationGUI::executeCommand ( )
Returns
bool

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

References $cmd, array, ilObjectGUI\getAdminTabs(), and ilObjectGUI\prepareOutput().

32  {
33  $next_class = $this->ctrl->getNextClass($this);
34  $cmd = $this->ctrl->getCmd();
35 
36  $this->prepareOutput();
37 
38  switch($next_class)
39  {
40  case 'ilpermissiongui':
41  $this->tabs_gui->setTabActive('perm_settings');
42  require_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
43  $this->ctrl->forwardCommand(new ilPermissionGUI($this));
44  break;
45 
46  default:
47  if(!$cmd || $cmd == 'view')
48  {
49  $cmd = 'editSettings';
50  }
51 
52  $this->$cmd();
53  break;
54  }
55  return true;
56  }
$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:

◆ getSettingsForm()

ilObjForumAdministrationGUI::getSettingsForm ( )
protected
Returns
ilPropertyFormGUI

Definition at line 175 of file class.ilObjForumAdministrationGUI.php.

References $ilSetting, ilPropertyFormGUI\addCommandButton(), ilAdministrationSettingsFormHandler\addFieldsToForm(), ilPropertyFormGUI\addItem(), ilRadioGroupInputGUI\addOption(), ilNumberInputGUI\allowDecimals(), array, ilCaptchaUtil\checkFreetype(), ilForumProperties\FILE_UPLOAD_GLOBALLY_ALLOWED, ilForumProperties\FILE_UPLOAD_INDIVIDUAL, ilAdministrationSettingsFormHandler\FORM_ACCESSIBILITY, ilAdministrationSettingsFormHandler\FORM_FORUM, ilAdministrationSettingsFormHandler\FORM_PRIVACY, ilCronManager\isJobActive(), ilFormGUI\setFormAction(), ilFormPropertyGUI\setInfo(), ilPropertyFormGUI\setTitle(), and ilAdministrationSettingsFormHandler\VALUE_BOOL.

Referenced by editSettings().

176  {
177  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
178  $form = new ilPropertyFormGUI();
179  $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
180  $form->setTitle($this->lng->txt('settings'));
181 
182  $frm_radio = new ilRadioGroupInputGUI($this->lng->txt('frm_displayed_infos'), 'forum_overview');
183  $frm_radio->addOption(new ilRadioOption($this->lng->txt('new') . ', ' . $this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '0'));
184  $frm_radio->addOption(new ilRadioOption($this->lng->txt('is_read') . ', ' . $this->lng->txt('unread'), '1'));
185  $frm_radio->setInfo($this->lng->txt('frm_disp_info_desc'));
186  $form->addItem($frm_radio);
187 
188  $check = new ilCheckboxInputGui($this->lng->txt('enable_fora_statistics'), 'fora_statistics');
189  $check->setInfo($this->lng->txt('enable_fora_statistics_desc'));
190  $form->addItem($check);
191 
192  $check = new ilCheckboxInputGui($this->lng->txt('enable_anonymous_fora'), 'anonymous_fora');
193  $check->setInfo($this->lng->txt('enable_anonymous_fora_desc'));
194  $form->addItem($check);
195 
196  $file_upload = new ilRadioGroupInputGUI($this->lng->txt('file_upload_allowed_fora'), 'file_upload_allowed_fora');
197  $file_upload->addOption(new ilRadioOption($this->lng->txt('file_upload_option_allow'), ilForumProperties::FILE_UPLOAD_GLOBALLY_ALLOWED));
198  $file_upload->addOption(new ilRadioOption($this->lng->txt('file_upload_option_disallow'), ilForumProperties::FILE_UPLOAD_INDIVIDUAL));
199  $file_upload->setInfo($this->lng->txt('file_upload_allowed_fora_desc'));
200  $form->addItem($file_upload);
201 
202  require_once 'Services/Cron/classes/class.ilCronManager.php';
203  if(ilCronManager::isJobActive('frm_notification'))
204  {
205  require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
208  $form,
209  $this
210  );
211  }
212  else
213  {
214  $notifications = new ilCheckboxInputGui($this->lng->txt('cron_forum_notification'), 'forum_notification');
215  $notifications->setInfo($this->lng->txt('cron_forum_notification_desc'));
216  $notifications->setValue(1);
217  $form->addItem($notifications);
218  }
219 
220  $check = new ilCheckboxInputGui($this->lng->txt('enable_send_attachments'), 'send_attachments_by_mail');
221  $check->setInfo($this->lng->txt('enable_send_attachments_desc'));
222  $check->setValue(1);
223  $form->addItem($check);
224 
225  require_once 'Services/Captcha/classes/class.ilCaptchaUtil.php';
226  $cap = new ilCheckboxInputGUI($this->lng->txt('adm_captcha_anonymous_short'), 'activate_captcha_anonym');
227  $cap->setInfo($this->lng->txt('adm_captcha_anonymous_frm'));
228  $cap->setValue(1);
230  {
231  $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
232  }
233  $form->addItem($cap);
234 
235  $drafts = new ilCheckboxInputGUI($this->lng->txt('adm_save_drafts'), 'save_post_drafts');
236  $drafts->setInfo($this->lng->txt('adm_save_drafts_desc'));
237  $drafts->setValue(1);
238 
239  $autosave_drafts = new ilCheckboxInputGUI($this->lng->txt('adm_autosave_drafts'), 'autosave_drafts');
240  $autosave_drafts->setInfo($this->lng->txt('adm_autosave_drafts_desc'));
241  $autosave_drafts->setValue(1);
242 
243  $autosave_interval = new ilNumberInputGUI($this->lng->txt('adm_autosave_ival'), 'autosave_drafts_ival');
244  $autosave_interval->allowDecimals(false);
245  $autosave_interval->setMinValue(30);
246  $autosave_interval->setMaxValue(60 * 60);
247  $autosave_interval->setSize(10);
248  $autosave_interval->setSuffix($this->lng->txt('seconds'));
249  $autosave_drafts->addSubItem($autosave_interval);
250  $drafts->addSubItem($autosave_drafts);
251  $form->addItem($drafts);
252 
253  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
254  $form->addCommandButton('editSettings', $this->lng->txt('cancel'));
255 
256  return $form;
257  }
This class represents an option in a radio group.
This class represents a property form user interface.
static checkFreetype()
Check whether captcha support is active.
This class represents a checkbox property in a property form.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
allowDecimals($a_value)
Toggle Decimals.
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
addOption($a_option)
Add Option.
This class represents a number property in a property form.
static isJobActive($a_job_id)
Check if given job is currently active.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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