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

Media Cast Settings. More...

+ Inheritance diagram for ilObjTaggingSettingsGUI:
+ Collaboration diagram for ilObjTaggingSettingsGUI:

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...
 
 addSubTabs ()
 Add subtabs. More...
 
 editSettings ()
 Edit mediacast settings. More...
 
 saveSettings ()
 Save mediacast settings. More...
 
 cancel ()
 Save mediacast settings. More...
 
 editForbiddenTags ()
 Edit forbidden tags. More...
 
 initForbiddenTagsForm ()
 Init forbidden tags form. More...
 
 saveForbiddenTags ()
 Save forbidden tags. More...
 
 showUsers ($a_search=false)
 Show users. More...
 
 searchUsersForTag ()
 Search users for tag. 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...
 

Static Private Attributes

static $ERROR_MESSAGE
 

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()

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

Contructor.

public

Definition at line 24 of file class.ilObjTaggingSettingsGUI.php.

25  {
26  $this->type = 'tags';
27  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 
29  $this->lng->loadLanguageModule('tagging');
30  }

Member Function Documentation

◆ addSubTabs()

ilObjTaggingSettingsGUI::addSubTabs ( )

Add subtabs.

Definition at line 101 of file class.ilObjTaggingSettingsGUI.php.

References $ilCtrl, and ilObjectGUI\$lng.

Referenced by editForbiddenTags(), editSettings(), and showUsers().

102  {
103  global $ilTabs, $lng, $ilCtrl, $ilAccess;
104 
105  $tags_set = new ilSetting("tags");
106  if ($tags_set->get("enable"))
107  {
108  $ilTabs->addSubTab("settings", $lng->txt("settings"),
109  $ilCtrl->getLinkTarget($this, "editSettings"));
110 
111  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
112  {
113  $ilTabs->addSubTab("forbidden_tags", $lng->txt("tagging_forbidden_tags"),
114  $ilCtrl->getLinkTarget($this, "editForbiddenTags"));
115 
116  $ilTabs->addSubTab("users", $lng->txt("users"),
117  $ilCtrl->getLinkTarget($this, "showUsers"));
118  }
119  }
120  }
ILIAS Setting Class.
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ cancel()

ilObjTaggingSettingsGUI::cancel ( )

Save mediacast settings.

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

References $ilCtrl.

159  {
160  global $ilCtrl;
161 
162  $ilCtrl->redirect($this, "view");
163  }
global $ilCtrl
Definition: ilias.php:18

◆ editForbiddenTags()

ilObjTaggingSettingsGUI::editForbiddenTags ( )

Edit forbidden tags.

Definition at line 222 of file class.ilObjTaggingSettingsGUI.php.

References ilObjectGUI\$tpl, addSubTabs(), and initForbiddenTagsForm().

223  {
224  global $ilTabs, $tpl;
225 
226  $this->addSubTabs();
227  $ilTabs->activateSubTab("forbidden_tags");
228  $ilTabs->activateTab("tagging_edit_settings");
229  $this->initForbiddenTagsForm();
230 
231  $tpl->setContent($this->form->getHTML());
232  }
initForbiddenTagsForm()
Init forbidden tags form.
+ Here is the call graph for this function:

◆ editSettings()

ilObjTaggingSettingsGUI::editSettings ( )

Edit mediacast settings.

Definition at line 126 of file class.ilObjTaggingSettingsGUI.php.

References addSubTabs(), and initFormSettings().

127  {
128  global $ilTabs;
129 
130  $this->tabs_gui->setTabActive('tagging_edit_settings');
131  $this->addSubTabs();
132  $ilTabs->activateSubTab("settings");
133  $this->initFormSettings();
134  return true;
135  }
initFormSettings()
Init settings property form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjTaggingSettingsGUI::executeCommand ( )

Execute command.

public

Definition at line 38 of file class.ilObjTaggingSettingsGUI.php.

References $cmd, $ilErr, $ret, and ilObjectGUI\prepareOutput().

39  {
40  global $rbacsystem,$ilErr,$ilAccess;
41 
42  $next_class = $this->ctrl->getNextClass($this);
43  $cmd = $this->ctrl->getCmd();
44 
45  $this->prepareOutput();
46 
47  if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
48  {
49  $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
50  }
51 
52  switch($next_class)
53  {
54  case 'ilpermissiongui':
55  $this->tabs_gui->setTabActive('perm_settings');
56  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
57  $perm_gui = new ilPermissionGUI($this);
58  $ret = $this->ctrl->forwardCommand($perm_gui);
59  break;
60 
61  default:
62  if(!$cmd || $cmd == 'view')
63  {
64  $cmd = "editSettings";
65  }
66 
67  $this->$cmd();
68  break;
69  }
70  return true;
71  }
global $ilErr
Definition: raiseError.php:16
$cmd
Definition: sahs_server.php:35
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjTaggingSettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 79 of file class.ilObjTaggingSettingsGUI.php.

References array.

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

◆ initForbiddenTagsForm()

ilObjTaggingSettingsGUI::initForbiddenTagsForm ( )

Init forbidden tags form.

Definition at line 237 of file class.ilObjTaggingSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilTextAreaInputGUI\setCols().

Referenced by editForbiddenTags(), and saveForbiddenTags().

238  {
239  global $lng, $ilCtrl;
240 
241  $tags_set = new ilSetting("tags");
242  $forbidden = $tags_set->get("forbidden_tags");
243 
244  if ($forbidden != "")
245  {
246  $tags_array = unserialize($forbidden);
247  $forb_str = implode($tags_array, " ");
248  }
249 
250  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
251  $this->form = new ilPropertyFormGUI();
252 
253  // tags
254  $ta = new ilTextAreaInputGUI($this->lng->txt("tagging_tags"), "forbidden_tags");
255  $ta->setCols(50);
256  $ta->setRows(10);
257  $ta->setValue($forb_str);
258  $this->form->addItem($ta);
259 
260  $this->form->addCommandButton("saveForbiddenTags", $lng->txt("save"));
261 
262  $this->form->setTitle($lng->txt("tagging_forbidden_tags"));
263  $this->form->setFormAction($ilCtrl->getFormAction($this));
264 
265  }
ILIAS Setting Class.
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjTaggingSettingsGUI::initFormSettings ( )
protected

Init settings property form.

protected

Definition at line 170 of file class.ilObjTaggingSettingsGUI.php.

References ilObjectGUI\$lng, ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_TAGGING, ilFormPropertyGUI\setInfo(), and ilCheckboxInputGUI\setValue().

Referenced by editSettings().

171  {
172  global $lng, $ilAccess;
173 
174  $tags_set = new ilSetting("tags");
175 
176 
177  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
178  $form = new ilPropertyFormGUI();
179  $form->setFormAction($this->ctrl->getFormAction($this));
180  $form->setTitle($this->lng->txt('tagging_settings'));
181 
182  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
183  {
184  $form->addCommandButton('saveSettings',$this->lng->txt('save'));
185  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
186  }
187 
188  // enable tagging
189  $cb_prop = new ilCheckboxInputGUI($lng->txt("tagging_enable_tagging"),
190  "enable_tagging");
191  $cb_prop->setValue("1");
192  $cb_prop->setChecked($tags_set->get("enable"));
193 
194  // enable all users info
195  $cb_prop2 = new ilCheckboxInputGUI($lng->txt("tagging_enable_all_users"),
196  "enable_all_users");
197  $cb_prop2->setInfo($lng->txt("tagging_enable_all_users_info"));
198  $cb_prop2->setChecked($tags_set->get("enable_all_users"));
199  $cb_prop->addSubItem($cb_prop2);
200 
201  $form->addItem($cb_prop);
202 
203  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
206  $form,
207  $this
208  );
209 
210  $this->tpl->setContent($form->getHTML());
211  }
ILIAS Setting Class.
This class represents a property form user interface.
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.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveForbiddenTags()

ilObjTaggingSettingsGUI::saveForbiddenTags ( )

Save forbidden tags.

Definition at line 270 of file class.ilObjTaggingSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $t, ilObjectGUI\$tpl, array, ilObjectGUI\checkPermission(), initForbiddenTagsForm(), and ilUtil\sendSuccess().

271  {
272  global $tpl, $lng, $ilCtrl;
273 
274  $this->initForbiddenTagsForm();
275  $this->form->checkInput();
276 
277  $this->checkPermission("write");
278 
279  $tags = str_replace(",", " ", $_POST["forbidden_tags"]);
280  $tags = explode(" ", $tags);
281  $tags_array = array();
282  foreach ($tags as $t)
283  {
284  $t = strtolower(trim($t));
285  if ($t != "")
286  {
287  $tags_array[$t] = $t;
288  }
289  }
290 
291  asort($tags_array);
292 
293  $tags_set = new ilSetting("tags");
294 
295  $tags_set->set("forbidden_tags", serialize($tags_array));
296 
297  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
298  $ilCtrl->redirect($this, "editForbiddenTags");
299  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
ILIAS Setting Class.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
initForbiddenTagsForm()
Init forbidden tags form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettings()

ilObjTaggingSettingsGUI::saveSettings ( )

Save mediacast settings.

Definition at line 140 of file class.ilObjTaggingSettingsGUI.php.

References $_POST, $ilCtrl, $ilSetting, ilObjectGUI\checkPermission(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

141  {
142  global $ilCtrl, $ilSetting;
143 
144  $this->checkPermission("write");
145 
146  $tags_set = new ilSetting("tags");
147  $tags_set->set("enable", ilUtil::stripSlashes($_POST["enable_tagging"]));
148  $tags_set->set("enable_all_users", ilUtil::stripSlashes($_POST["enable_all_users"]));
149  $ilSetting->set("block_activated_pdtag", $_POST["enable_tagging"]);
150 
151  ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
152  $ilCtrl->redirect($this, "view");
153  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
ILIAS Setting Class.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ searchUsersForTag()

ilObjTaggingSettingsGUI::searchUsersForTag ( )

Search users for tag.

Definition at line 348 of file class.ilObjTaggingSettingsGUI.php.

References showUsers().

349  {
350  $this->showUsers(true);
351  }
showUsers($a_search=false)
Show users.
+ Here is the call graph for this function:

◆ showUsers()

ilObjTaggingSettingsGUI::showUsers (   $a_search = false)

Show users.

Definition at line 310 of file class.ilObjTaggingSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, addSubTabs(), ilObjectGUI\checkPermission(), ilTextInputGUI\setSize(), and ilUtil\stripSlashes().

Referenced by searchUsersForTag().

311  {
312  global $ilTabs, $tpl, $ilToolbar, $lng, $ilCtrl;
313 
314  $this->checkPermission("write");
315 
316  $this->addSubTabs();
317  $ilTabs->activateTab("tagging_edit_settings");
318  $ilTabs->activateSubTab("users");
319 
320  $tag = ($_POST["tag"] != "")
321  ? ilUtil::stripSlashes($_POST["tag"])
322  : $_GET["tag"];
323 
324  // tag input
325  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
326  $ti = new ilTextInputGUI($lng->txt("tagging_tag"), "tag");
327  $ti->setSize(15);
328  $ti->setValue($tag);
329  $ilToolbar->addInputItem($ti, true);
330 
331  $ilToolbar->addFormButton($lng->txt("tagging_search_users"), "searchUsersForTag");
332  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "searchUsersForTag"));
333 
334  if ($a_search)
335  {
336  include_once("./Services/Tagging/classes/class.ilUserForTagTableGUI.php");
337  $ilCtrl->setParameter($this, "tag", $tag);
338  $table = new ilUserForTagTableGUI($this, "searchUsersForTag",
339  $tag);
340  $tpl->setContent($table->getHTML());
341  }
342  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Show all users for a tag.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ERROR_MESSAGE

ilObjTaggingSettingsGUI::$ERROR_MESSAGE
staticprivate

Definition at line 18 of file class.ilObjTaggingSettingsGUI.php.


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