ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjMediaObjectsSettingsGUI Class Reference

Media Objects/Pools Settings. More...

+ Inheritance diagram for ilObjMediaObjectsSettingsGUI:
+ Collaboration diagram for ilObjMediaObjectsSettingsGUI:

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_omit_init=false)
 Edit settings. More...
 
 saveSettings ()
 Save settings. More...
 
 initMediaObjectsSettingsForm ()
 Init media objects settings form. More...
 
 getSettingsValues ()
 Get current values for form from. 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 @access 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 ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Attributes

 $error
 
 $access
 
 $tabs
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 

Detailed Description

Media Objects/Pools Settings.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjMediaObjectsSettingsGUI: ilPermissionGUI @ilCtrl_IsCalledBy ilObjMediaObjectsSettingsGUI: ilAdministrationGUI

Definition at line 17 of file class.ilObjMediaObjectsSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

@access public

Definition at line 40 of file class.ilObjMediaObjectsSettingsGUI.php.

41 {
42 global $DIC;
43 $this->error = $DIC["ilErr"];
44 $this->access = $DIC->access();
45 $this->tabs = $DIC->tabs();
46 $this->tpl = $DIC["tpl"];
47 $this->lng = $DIC->language();
48 $this->ctrl = $DIC->ctrl();
49 $this->type = 'mobs';
50 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
51
52 $this->lng->loadLanguageModule('mob');
53 $this->lng->loadLanguageModule('mep');
54 $this->lng->loadLanguageModule('content');
55 }
error($a_errmsg)
set error message @access public
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and error().

+ Here is the call graph for this function:

Member Function Documentation

◆ editSettings()

ilObjMediaObjectsSettingsGUI::editSettings (   $a_omit_init = false)

Edit settings.

Definition at line 125 of file class.ilObjMediaObjectsSettingsGUI.php.

126 {
128
129 if (!$a_omit_init) {
131 $this->getSettingsValues();
132 }
133 $tpl->setContent($this->form->getHTML());
134 }
initMediaObjectsSettingsForm()
Init media objects settings form.
getSettingsValues()
Get current values for form from.

References ilObjectGUI\$tpl, getSettingsValues(), and initMediaObjectsSettingsForm().

Referenced by saveSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjMediaObjectsSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 63 of file class.ilObjMediaObjectsSettingsGUI.php.

64 {
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
67
68 $this->prepareOutput();
69
70 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
71 $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
72 }
73
74 switch ($next_class) {
75 case 'ilpermissiongui':
76 $this->tabs_gui->setTabActive('perm_settings');
77 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
78 $perm_gui = new ilPermissionGUI($this);
79 $ret = $this->ctrl->forwardCommand($perm_gui);
80 break;
81
82 default:
83 if (!$cmd || $cmd == 'view') {
84 $cmd = "editSettings";
85 }
86
87 $this->$cmd();
88 break;
89 }
90 return true;
91 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, error(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjMediaObjectsSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 99 of file class.ilObjMediaObjectsSettingsGUI.php.

100 {
101 $ilAccess = $this->access;
102 $ilTabs = $this->tabs;
103
104 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
105 $ilTabs->addTarget(
106 "settings",
107 $this->ctrl->getLinkTarget($this, "editSettings"),
108 array("editSettings", "view")
109 );
110 }
111
112 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
113 $ilTabs->addTarget(
114 "perm_settings",
115 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
116 array(),
117 'ilpermissiongui'
118 );
119 }
120 }

References $access, and $tabs.

◆ getSettingsValues()

ilObjMediaObjectsSettingsGUI::getSettingsValues ( )

Get current values for form from.

Definition at line 210 of file class.ilObjMediaObjectsSettingsGUI.php.

211 {
212 $values = array();
213
214 $mset = new ilSetting("mobs");
215 $values["activate_pages"] = $mset->get("mep_activate_pages");
216 $values["file_manager_always"] = $mset->get("file_manager_always");
217 $values["restricted_file_types"] = $mset->get("restricted_file_types");
218 $values["black_list_file_types"] = $mset->get("black_list_file_types");
219
220 $this->form->setValuesByArray($values);
221 }
ILIAS Setting Class.

Referenced by editSettings().

+ Here is the caller graph for this function:

◆ initMediaObjectsSettingsForm()

ilObjMediaObjectsSettingsGUI::initMediaObjectsSettingsForm ( )

Init media objects settings form.

Definition at line 167 of file class.ilObjMediaObjectsSettingsGUI.php.

168 {
170 $ilCtrl = $this->ctrl;
171 $ilAccess = $this->access;
172
173
174 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
175 $this->form = new ilPropertyFormGUI();
176
177 // activate page in media pool
178 $cb = new ilCheckboxInputGUI($lng->txt("mobs_activate_pages"), "activate_pages");
179 $cb->setInfo($lng->txt("mobs_activate_pages_info"));
180 $this->form->addItem($cb);
181
182 // activate page in media pool
183 $cb = new ilCheckboxInputGUI($lng->txt("mobs_always_show_file_manager"), "file_manager_always");
184 $cb->setInfo($lng->txt("mobs_always_show_file_manager_info"));
185 $this->form->addItem($cb);
186
187 // allowed file types
188 $ta = new ilTextAreaInputGUI($this->lng->txt("mobs_restrict_file_types"), "restricted_file_types");
189 //$ta->setCols();
190 //$ta->setRows();
191 $ta->setInfo($this->lng->txt("mobs_restrict_file_types_info"));
192 $this->form->addItem($ta);
193
194 // black lis file types
195 $ta = new ilTextAreaInputGUI($this->lng->txt("mobs_black_list_file_types"), "black_list_file_types");
196 $ta->setInfo($this->lng->txt("mobs_black_list_file_types_info"));
197 $this->form->addItem($ta);
198
199 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
200 $this->form->addCommandButton("saveSettings", $lng->txt("save"));
201 }
202
203 $this->form->setTitle($lng->txt("settings"));
204 $this->form->setFormAction($ilCtrl->getFormAction($this));
205 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.
This class represents a text area property in a property form.

References $access, ilObjectGUI\$ctrl, and ilObjectGUI\$lng.

Referenced by editSettings(), and saveSettings().

+ Here is the caller graph for this function:

◆ saveSettings()

ilObjMediaObjectsSettingsGUI::saveSettings ( )

Save settings.

Definition at line 139 of file class.ilObjMediaObjectsSettingsGUI.php.

140 {
143 $ilCtrl = $this->ctrl;
144
145 $this->checkPermission("write");
146
148 if ($this->form->checkInput()) {
149 // perform save
150 $mset = new ilSetting("mobs");
151 $mset->set("mep_activate_pages", $_POST["activate_pages"]);
152 $mset->set("file_manager_always", $_POST["file_manager_always"]);
153 $mset->set("restricted_file_types", $_POST["restricted_file_types"]);
154 $mset->set("black_list_file_types", $_POST["black_list_file_types"]);
155
156 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
157 $ilCtrl->redirect($this, "editSettings");
158 }
159
160 $this->form->setValuesByPost();
161 $this->editSettings(true);
162 }
$_POST["username"]
editSettings($a_omit_init=false)
Edit settings.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References $_POST, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), editSettings(), and initMediaObjectsSettingsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilObjMediaObjectsSettingsGUI::$access
protected

◆ $error

ilObjMediaObjectsSettingsGUI::$error
protected

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

◆ $tabs

ilObjMediaObjectsSettingsGUI::$tabs
protected

Definition at line 33 of file class.ilObjMediaObjectsSettingsGUI.php.

Referenced by getAdminTabs().


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