ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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
 

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::ilObjectGUI($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 218 of file class.ilObjTaggingSettingsGUI.php.

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

219  {
220  global $ilTabs, $tpl;
221 
222  $this->addSubTabs();
223  $ilTabs->activateSubTab("forbidden_tags");
224  $ilTabs->activateTab("tagging_edit_settings");
225  $this->initForbiddenTagsForm();
226 
227  $tpl->setContent($this->form->getHTML());
228  }
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  }
$cmd
Definition: sahs_server.php:35
prepareOutput()
prepare output
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.

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  }

◆ initForbiddenTagsForm()

ilObjTaggingSettingsGUI::initForbiddenTagsForm ( )

Init forbidden tags form.

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

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

Referenced by editForbiddenTags(), and saveForbiddenTags().

234  {
235  global $lng, $ilCtrl;
236 
237  $tags_set = new ilSetting("tags");
238  $forbidden = $tags_set->get("forbidden_tags");
239 
240  if ($forbidden != "")
241  {
242  $tags_array = unserialize($forbidden);
243  $forb_str = implode($tags_array, " ");
244  }
245 
246  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
247  $this->form = new ilPropertyFormGUI();
248 
249  // tags
250  $ta = new ilTextAreaInputGUI($this->lng->txt("tagging_tags"), "forbidden_tags");
251  $ta->setCols(50);
252  $ta->setRows(10);
253  $ta->setValue($forb_str);
254  $this->form->addItem($ta);
255 
256  $this->form->addCommandButton("saveForbiddenTags", $lng->txt("save"));
257 
258  $this->form->setTitle($lng->txt("tagging_forbidden_tags"));
259  $this->form->setFormAction($ilCtrl->getFormAction($this));
260 
261  }
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;
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  $form->addCommandButton('saveSettings',$this->lng->txt('save'));
182  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
183 
184  // enable tagging
185  $cb_prop = new ilCheckboxInputGUI($lng->txt("tagging_enable_tagging"),
186  "enable_tagging");
187  $cb_prop->setValue("1");
188  $cb_prop->setChecked($tags_set->get("enable"));
189 
190  // enable all users info
191  $cb_prop2 = new ilCheckboxInputGUI($lng->txt("tagging_enable_all_users"),
192  "enable_all_users");
193  $cb_prop2->setInfo($lng->txt("tagging_enable_all_users_info"));
194  $cb_prop2->setChecked($tags_set->get("enable_all_users"));
195  $cb_prop->addSubItem($cb_prop2);
196 
197  $form->addItem($cb_prop);
198 
199  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
202  $form,
203  $this
204  );
205 
206  $this->tpl->setContent($form->getHTML());
207  }
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 266 of file class.ilObjTaggingSettingsGUI.php.

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

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

◆ searchUsersForTag()

ilObjTaggingSettingsGUI::searchUsersForTag ( )

Search users for tag.

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

References showUsers().

345  {
346  $this->showUsers(true);
347  }
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 306 of file class.ilObjTaggingSettingsGUI.php.

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

Referenced by searchUsersForTag().

307  {
308  global $ilTabs, $tpl, $ilToolbar, $lng, $ilCtrl;
309 
310  $this->checkPermission("write");
311 
312  $this->addSubTabs();
313  $ilTabs->activateTab("tagging_edit_settings");
314  $ilTabs->activateSubTab("users");
315 
316  $tag = ($_POST["tag"] != "")
317  ? ilUtil::stripSlashes($_POST["tag"])
318  : $_GET["tag"];
319 
320  // tag input
321  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
322  $ti = new ilTextInputGUI($lng->txt("tagging_tag"), "tag");
323  $ti->setSize(15);
324  $ti->setValue($tag);
325  $ilToolbar->addInputItem($ti, true);
326 
327  $ilToolbar->addFormButton($lng->txt("tagging_search_users"), "searchUsersForTag");
328  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "searchUsersForTag"));
329 
330  if ($a_search)
331  {
332  include_once("./Services/Tagging/classes/class.ilUserForTagTableGUI.php");
333  $ilCtrl->setParameter($this, "tag", $tag);
334  $table = new ilUserForTagTableGUI($this, "searchUsersForTag",
335  $tag);
336  $tpl->setContent($table->getHTML());
337  }
338  }
$_POST['username']
Definition: cron.php:12
$_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.
+ 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: