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

Blog Administration Settings. More...

+ Inheritance diagram for ilObjBlogAdministrationGUI:
+ Collaboration diagram for ilObjBlogAdministrationGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ($a_form=null)
 Edit settings. More...
 
 saveSettings ()
 Save settings. More...
 
 cancel ()
 Save settings. More...
 
- 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

 initFormSettings ()
 Init settings property form. 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...
 
- 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()

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

Contructor.

public

Definition at line 23 of file class.ilObjBlogAdministrationGUI.php.

24  {
25  $this->type = "blga";
26  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
27 
28  $this->lng->loadLanguageModule("blog");
29  }

Member Function Documentation

◆ cancel()

ilObjBlogAdministrationGUI::cancel ( )

Save settings.

Definition at line 146 of file class.ilObjBlogAdministrationGUI.php.

References $ilCtrl.

147  {
148  global $ilCtrl;
149 
150  $ilCtrl->redirect($this, "view");
151  }
global $ilCtrl
Definition: ilias.php:18

◆ editSettings()

ilObjBlogAdministrationGUI::editSettings (   $a_form = null)

Edit settings.

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

References $ilSetting, ilObjectGUI\$lng, initFormSettings(), and ilUtil\sendInfo().

Referenced by saveSettings().

93  {
94  global $lng, $ilSetting;
95 
96  $this->tabs_gui->setTabActive('settings');
97 
98  if (!$ilSetting->get("disable_wsp_blogs"))
99  {
100  ilUtil::sendInfo($lng->txt("blog_admin_toggle_info"));
101  }
102  else
103  {
104  ilUtil::sendInfo($lng->txt("blog_admin_inactive_info"));
105  }
106 
107  if(!$a_form)
108  {
109  $a_form = $this->initFormSettings();
110  }
111  $this->tpl->setContent($a_form->getHTML());
112  return true;
113  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilSetting
Definition: privfeed.php:17
initFormSettings()
Init settings property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjBlogAdministrationGUI::executeCommand ( )

Execute command.

public

Definition at line 37 of file class.ilObjBlogAdministrationGUI.php.

References $cmd, and ilObjectGUI\prepareOutput().

38  {
39  $next_class = $this->ctrl->getNextClass($this);
40  $cmd = $this->ctrl->getCmd();
41 
42  $this->prepareOutput();
43 
44  switch($next_class)
45  {
46  case 'ilpermissiongui':
47  $this->tabs_gui->setTabActive('perm_settings');
48  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
49  $perm_gui = new ilPermissionGUI($this);
50  $this->ctrl->forwardCommand($perm_gui);
51  break;
52 
53  default:
54  if(!$cmd || $cmd == 'view')
55  {
56  $cmd = "editSettings";
57  }
58 
59  $this->$cmd();
60  break;
61  }
62  return true;
63  }
$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:

◆ getAdminTabs()

ilObjBlogAdministrationGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 71 of file class.ilObjBlogAdministrationGUI.php.

References array, and ilObjectGUI\checkPermissionBool().

72  {
73  if ($this->checkPermissionBool("visible,read"))
74  {
75  $this->tabs_gui->addTarget("settings",
76  $this->ctrl->getLinkTarget($this, "editSettings"),
77  array("editSettings", "view"));
78  }
79 
80  if ($this->checkPermissionBool('edit_permission'))
81  {
82  $this->tabs_gui->addTarget("perm_settings",
83  $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
84  array(),'ilpermissiongui');
85  }
86  }
Create styles array
The data for the language used.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ initFormSettings()

ilObjBlogAdministrationGUI::initFormSettings ( )
protected

Init settings property form.

protected

Definition at line 158 of file class.ilObjBlogAdministrationGUI.php.

References ilObjectGUI\$lng, $mask, ilObjectGUI\checkPermissionBool(), ilFormPropertyGUI\setInfo(), and ilFormPropertyGUI\setRequired().

Referenced by editSettings(), and saveSettings().

159  {
160  global $lng;
161 
162  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
163  $form = new ilPropertyFormGUI();
164  $form->setFormAction($this->ctrl->getFormAction($this));
165  $form->setTitle($this->lng->txt('blog_settings'));
166 
167  if ($this->checkPermissionBool("write"))
168  {
169  $form->addCommandButton('saveSettings',$this->lng->txt('save'));
170  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
171  }
172 
173  $banner = new ilCheckboxInputGUI($lng->txt("blog_preview_banner"), "banner");
174  $banner->setInfo($lng->txt("blog_preview_banner_info"));
175  $form->addItem($banner);
176 
177  $width = new ilNumberInputGUI($lng->txt("blog_preview_banner_width"), "width");
178  $width->setRequired(true);
179  $width->setSize(4);
180  $banner->addSubItem($width);
181 
182  $height = new ilNumberInputGUI($lng->txt("blog_preview_banner_height"), "height");
183  $height->setRequired(true);
184  $height->setSize(4);
185  $banner->addSubItem($height);
186 
187  $blga_set = new ilSetting("blga");
188  $banner->setChecked($blga_set->get("banner", false));
189  if($blga_set->get("banner"))
190  {
191  $width->setValue($blga_set->get("banner_width"));
192  $height->setValue($blga_set->get("banner_height"));
193  }
194  else
195  {
196  $width->setValue(1370);
197  $height->setValue(100);
198  }
199 
200  $mask = new ilCheckboxInputGUI($lng->txt("blog_allow_html"), "mask");
201  $mask->setInfo($lng->txt("blog_allow_html_info"));
202  $mask->setChecked($blga_set->get("mask", false));
203  $form->addItem($mask);
204 
205  return $form;
206  }
ILIAS Setting Class.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
$mask
Definition: example_042.php:90
This class represents a number property in a property form.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjBlogAdministrationGUI::saveSettings ( )

Save settings.

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

References $ilCtrl, ilObjectGUI\checkPermission(), editSettings(), initFormSettings(), and ilUtil\sendSuccess().

119  {
120  global $ilCtrl;
121 
122  $this->checkPermission("write");
123 
124  $form = $this->initFormSettings();
125  if($form->checkInput())
126  {
127  $banner = (bool)$form->getInput("banner");
128 
129  $blga_set = new ilSetting("blga");
130  $blga_set->set("banner", $banner);
131  $blga_set->set("banner_width", (int)$form->getInput("width"));
132  $blga_set->set("banner_height", (int)$form->getInput("height"));
133  $blga_set->set("mask", (bool)$form->getInput("mask"));
134 
135  ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
136  $ilCtrl->redirect($this, "editSettings");
137  }
138 
139  $form->setValuesByPost();
140  $this->editSettings($form);
141  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
ILIAS Setting Class.
global $ilCtrl
Definition: ilias.php:18
initFormSettings()
Init settings property form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
editSettings($a_form=null)
Edit settings.
+ Here is the call graph for this function:

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