ILIAS  release_4-4 Revision
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...
 
 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 210 of file class.ilObjTaggingSettingsGUI.php.

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

211  {
212  global $ilTabs, $tpl;
213 
214  $this->addSubTabs();
215  $ilTabs->activateSubTab("forbidden_tags");
216  $ilTabs->activateTab("tagging_edit_settings");
217  $this->initForbiddenTagsForm();
218 
219  $tpl->setContent($this->form->getHTML());
220  }
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 225 of file class.ilObjTaggingSettingsGUI.php.

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

Referenced by editForbiddenTags(), and saveForbiddenTags().

226  {
227  global $lng, $ilCtrl;
228 
229  $tags_set = new ilSetting("tags");
230  $forbidden = $tags_set->get("forbidden_tags");
231 
232  if ($forbidden != "")
233  {
234  $tags_array = unserialize($forbidden);
235  $forb_str = implode($tags_array, " ");
236  }
237 
238  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
239  $this->form = new ilPropertyFormGUI();
240 
241  // tags
242  $ta = new ilTextAreaInputGUI($this->lng->txt("tagging_tags"), "forbidden_tags");
243  $ta->setCols(50);
244  $ta->setRows(10);
245  $ta->setValue($forb_str);
246  $this->form->addItem($ta);
247 
248  $this->form->addCommandButton("saveForbiddenTags", $lng->txt("save"));
249 
250  $this->form->setTitle($lng->txt("tagging_forbidden_tags"));
251  $this->form->setFormAction($ilCtrl->getFormAction($this));
252 
253  }
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, 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  $this->tpl->setContent($form->getHTML());
199  }
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.
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 258 of file class.ilObjTaggingSettingsGUI.php.

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

259  {
260  global $tpl, $lng, $ilCtrl;
261 
262  $this->initForbiddenTagsForm();
263  $this->form->checkInput();
264 
265  $this->checkPermission("write");
266 
267  $tags = str_replace(",", " ", $_POST["forbidden_tags"]);
268  $tags = explode(" ", $tags);
269  $tags_array = array();
270  foreach ($tags as $t)
271  {
272  $t = strtolower(trim($t));
273  if ($t != "")
274  {
275  $tags_array[$t] = $t;
276  }
277  }
278 
279  asort($tags_array);
280 
281  $tags_set = new ilSetting("tags");
282 
283  $tags_set->set("forbidden_tags", serialize($tags_array));
284 
285  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
286  $ilCtrl->redirect($this, "editForbiddenTags");
287  }
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 336 of file class.ilObjTaggingSettingsGUI.php.

References showUsers().

337  {
338  $this->showUsers(true);
339  }
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 298 of file class.ilObjTaggingSettingsGUI.php.

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

Referenced by searchUsersForTag().

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