ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjMDSettingsGUI Class Reference

Meta Data Settings. More...

+ Inheritance diagram for ilObjMDSettingsGUI:
+ Collaboration diagram for ilObjMDSettingsGUI:

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...
 
 showGeneralSettings ()
 Edit general settings. More...
 
 initGeneralSettingsForm ($a_mode="edit")
 Init general settings form. More...
 
 saveGeneralSettings ()
 Save general settings. More...
 
 showCopyrightSettings ()
 Edit copyright settings. More...
 
 saveCopyrightSettings ()
 Save news and external webfeeds settings. More...
 
 editEntry ()
 edit one selection More...
 
 addEntry ()
 add new entry More...
 
 saveEntry ()
 save new entry More...
 
 confirmDeleteEntries ()
 confirm deletion of entries More...
 
 deleteEntries ()
 delete entries More...
 
 updateEntry ()
 update one entry More...
 
 initCopyrightEditForm ($a_mode='edit')
 @access public More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access 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 @access 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

 initSettingsForm ()
 @access protected More...
 
 initMDSettings ()
 init Md settings More...
 
 stripSlashes ($a_str)
 Special function to strip slashes for copyright fields. 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 @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...
 
 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...
 

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

Meta Data Settings.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilObjMDSettingsGUI: ilPermissionGUI, ilAdvancedMDSettingsGUI

Definition at line 36 of file class.ilObjMDSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

@access public

Definition at line 44 of file class.ilObjMDSettingsGUI.php.

45 {
46 global $lng;
47
48 $this->type = 'mds';
49 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
50
51 $this->lng = $lng;
52 $this->lng->loadLanguageModule("meta");
53 }

References ilObjectGUI\$lng.

Member Function Documentation

◆ addEntry()

ilObjMDSettingsGUI::addEntry ( )

add new entry

@access public

Parameters

Definition at line 251 of file class.ilObjMDSettingsGUI.php.

252 {
253 $this->initCopyrightEditForm('add');
254 $this->tpl->setContent($this->form->getHTML());
255 }
initCopyrightEditForm($a_mode='edit')
@access public

References initCopyrightEditForm().

Referenced by saveEntry().

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

◆ confirmDeleteEntries()

ilObjMDSettingsGUI::confirmDeleteEntries ( )

confirm deletion of entries

@access public

Definition at line 296 of file class.ilObjMDSettingsGUI.php.

297 {
298 if(!is_array($_POST['entry_id']) or !count($_POST['entry_id']))
299 {
300 ilUtil::sendInfo($this->lng->txt('select_one'));
301 $this->showCopyrightSettings();
302 return true;
303 }
304
305 include_once('Services/Utilities/classes/class.ilConfirmationGUI.php');
306 $c_gui = new ilConfirmationGUI();
307
308 // set confirm/cancel commands
309 $c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteEntries"));
310 $c_gui->setHeaderText($this->lng->txt("md_delete_cp_sure"));
311 $c_gui->setCancel($this->lng->txt("cancel"), "showCopyrightSettings");
312 $c_gui->setConfirm($this->lng->txt("confirm"), "deleteEntries");
313
314 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
315
316 // add items to delete
317 foreach($_POST["entry_id"] as $entry_id)
318 {
319 $entry = new ilMDCopyrightSelectionEntry($entry_id);
320 $c_gui->addItem('entry_id[]',$entry_id,$entry->getTitle());
321 }
322 $this->tpl->setContent($c_gui->getHTML());
323 }
Confirmation screen class.
showCopyrightSettings()
Edit copyright settings.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_POST['username']
Definition: cron.php:12

References $_POST, ilUtil\sendInfo(), and showCopyrightSettings().

+ Here is the call graph for this function:

◆ deleteEntries()

ilObjMDSettingsGUI::deleteEntries ( )

delete entries

@access public

Definition at line 331 of file class.ilObjMDSettingsGUI.php.

332 {
333 if(!is_array($_POST['entry_id']) or !count($_POST['entry_id']))
334 {
335 ilUtil::sendInfo($this->lng->txt('select_one'));
336 $this->showCopyrightSettings();
337 return true;
338 }
339
340 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
341 foreach($_POST["entry_id"] as $entry_id)
342 {
343 $entry = new ilMDCopyrightSelectionEntry($entry_id);
344 $entry->delete();
345 }
346 ilUtil::sendSuccess($this->lng->txt('md_copyrights_deleted'));
347 $this->showCopyrightSettings();
348 return true;
349 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_POST, ilUtil\sendInfo(), ilUtil\sendSuccess(), and showCopyrightSettings().

+ Here is the call graph for this function:

◆ editEntry()

ilObjMDSettingsGUI::editEntry ( )

edit one selection

@access public

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

238 {
239 $this->ctrl->saveParameter($this,'entry_id');
240 $this->initCopyrightEditForm();
241 $this->tpl->setContent($this->form->getHTML());
242 }

References initCopyrightEditForm().

Referenced by updateEntry().

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

◆ executeCommand()

ilObjMDSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 61 of file class.ilObjMDSettingsGUI.php.

62 {
63 global $rbacsystem,$ilErr,$ilAccess;
64
65 $next_class = $this->ctrl->getNextClass($this);
66 $cmd = $this->ctrl->getCmd();
67
68 $this->prepareOutput();
69
70 if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
71 {
72 $ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
73 }
74
75 switch($next_class)
76 {
77 case 'iladvancedmdsettingsgui':
78 $this->tabs_gui->setTabActive('md_advanced');
79 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDSettingsGUI.php');
80 $adv_md = new ilAdvancedMDSettingsGUI();
81 $ret = $this->ctrl->forwardCommand($adv_md);
82 break;
83
84 case 'ilpermissiongui':
85 $this->tabs_gui->setTabActive('perm_settings');
86 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
87 $perm_gui =& new ilPermissionGUI($this);
88 $ret =& $this->ctrl->forwardCommand($perm_gui);
89 break;
90
91 default:
92 $this->initMDSettings();
93 if(!$cmd || $cmd == 'view')
94 {
95 $cmd = "showGeneralSettings";
96 }
97
98 $this->$cmd();
99 break;
100 }
101 return true;
102 }
initMDSettings()
init Md settings
prepareOutput()
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$cmd
Definition: sahs_server.php:35

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

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjMDSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Definition at line 110 of file class.ilObjMDSettingsGUI.php.

111 {
112 global $rbacsystem, $ilAccess;
113
114 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
115 {
116 $this->tabs_gui->addTarget("md_general_settings",
117 $this->ctrl->getLinkTarget($this, "showGeneralSettings"),
118 array("showGeneralSettings", "view"));
119
120 $this->tabs_gui->addTarget("md_copyright",
121 $this->ctrl->getLinkTarget($this, "showCopyrightSettings"),
122 array("showCopyrightSettings"));
123
124 $this->tabs_gui->addTarget("md_advanced",
125 $this->ctrl->getLinkTargetByClass('iladvancedmdsettingsgui', ""),
126 '',
127 'iladvancedmdsettingsgui');
128
129 }
130
131 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
132 {
133 $this->tabs_gui->addTarget("perm_settings",
134 $this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
135 array(),'ilpermissiongui');
136 }
137 }

◆ initCopyrightEditForm()

ilObjMDSettingsGUI::initCopyrightEditForm (   $a_mode = 'edit')

@access public

Parameters

Definition at line 413 of file class.ilObjMDSettingsGUI.php.

414 {
415 if(is_object($this->form))
416 {
417 return true;
418 }
419 if(!is_object($this->entry))
420 {
421 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
422 $this->entry = new ilMDCopyrightSelectionEntry((int) $_REQUEST['entry_id']);
423 }
424
425 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
426 $this->form = new ilPropertyFormGUI();
427 $this->form->setFormAction($this->ctrl->getFormAction($this));
428
429 $tit = new ilTextInputGUI($this->lng->txt('title'),'title');
430 $tit->setValue($this->entry->getTitle());
431 $tit->setRequired(true);
432 $tit->setSize(40);
433 $tit->setMaxLength(255);
434 $this->form->addItem($tit);
435
436 $des = new ilTextAreaInputGUI($this->lng->txt('description'),'description');
437 $des->setValue($this->entry->getDescription());
438 $des->setRows(3);
439 $this->form->addItem($des);
440
441 $cop = new ilTextAreaInputGUI($this->lng->txt('md_copyright_value'),'copyright');
442 $cop->setValue($this->entry->getCopyright());
443 $cop->setRows(5);
444 $this->form->addItem($cop);
445
446 switch($a_mode)
447 {
448 case 'edit':
449 $this->form->setTitle($this->lng->txt('md_copyright_edit'));
450 $this->form->addCommandButton('updateEntry',$this->lng->txt('save'));
451 $this->form->addCommandButton('showCopyrightSettings',$this->lng->txt('cancel'));
452 break;
453
454 case 'add':
455 $this->form->setTitle($this->lng->txt('md_copyright_add'));
456 $this->form->addCommandButton('saveEntry',$this->lng->txt('save'));
457 $this->form->addCommandButton('showCopyrightSettings',$this->lng->txt('cancel'));
458 break;
459 }
460
461 }
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST.

Referenced by addEntry(), and editEntry().

+ Here is the caller graph for this function:

◆ initGeneralSettingsForm()

ilObjMDSettingsGUI::initGeneralSettingsForm (   $a_mode = "edit")

Init general settings form.

Parameters
int$a_modeEdit Mode

Definition at line 155 of file class.ilObjMDSettingsGUI.php.

156 {
157 global $lng;
158
159 $this->tabs_gui->setTabActive('md_general_settings');
160
161 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
162 $this->form = new ilPropertyFormGUI();
163
164 $ti = new ilTextInputGUI($this->lng->txt("md_delimiter"), "delimiter");
165 $ti->setInfo($this->lng->txt("md_delimiter_info"));
166 $ti->setMaxLength(1);
167 $ti->setSize(1);
168 $ti->setValue($this->md_settings->getDelimiter());
169 $this->form->addItem($ti);
170
171 $this->form->addCommandButton("saveGeneralSettings", $lng->txt("save"));
172 $this->form->addCommandButton("showGeneralSettings", $lng->txt("cancel"));
173
174 $this->form->setTitle($lng->txt("md_general_settings"));
175 $this->form->setFormAction($this->ctrl->getFormAction($this));
176
177 }

References ilObjectGUI\$lng.

Referenced by showGeneralSettings().

+ Here is the caller graph for this function:

◆ initMDSettings()

ilObjMDSettingsGUI::initMDSettings ( )
protected

init Md settings

@access protected

Definition at line 468 of file class.ilObjMDSettingsGUI.php.

469 {
470 include_once('Services/MetaData/classes/class.ilMDSettings.php');
471 $this->md_settings = ilMDSettings::_getInstance();
472 }
static _getInstance()
get instance

References ilMDSettings\_getInstance().

Referenced by executeCommand().

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

◆ initSettingsForm()

ilObjMDSettingsGUI::initSettingsForm ( )
protected

@access protected

Definition at line 386 of file class.ilObjMDSettingsGUI.php.

387 {
388 if(is_object($this->form))
389 {
390 return true;
391 }
392 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
393 $this->form = new ilPropertyFormGUI();
394 $this->form->setFormAction($this->ctrl->getFormAction($this));
395 $this->form->setTitle($this->lng->txt('md_copyright_settings'));
396 $this->form->addCommandButton('saveCopyrightSettings',$this->lng->txt('save'));
397 $this->form->addCommandButton('showCopyrightSettings',$this->lng->txt('cancel'));
398
399 $check = new ilCheckboxInputGUI($this->lng->txt('md_copyright_enabled'),'active');
400 $check->setChecked($this->md_settings->isCopyrightSelectionActive());
401 $check->setValue(1);
402 $check->setInfo($this->lng->txt('md_copyright_enable_info'));
403 $this->form->addItem($check);
404 }
This class represents a checkbox property in a property form.

Referenced by showCopyrightSettings().

+ Here is the caller graph for this function:

◆ saveCopyrightSettings()

ilObjMDSettingsGUI::saveCopyrightSettings ( )

Save news and external webfeeds settings.

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

223 {
224 $this->md_settings->activateCopyrightSelection((int) $_POST['active']);
225 $this->md_settings->save();
226 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
227 $this->showCopyrightSettings();
228 }

References $_POST, ilUtil\sendSuccess(), and showCopyrightSettings().

+ Here is the call graph for this function:

◆ saveEntry()

ilObjMDSettingsGUI::saveEntry ( )

save new entry

@access public

Definition at line 264 of file class.ilObjMDSettingsGUI.php.

265 {
266 global $ilErr;
267
268 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
269 $this->entry = new ilMDCopyrightSelectionEntry(0);
270
271 $this->entry->setTitle(ilUtil::stripSlashes($_POST['title']));
272 $this->entry->setDescription(ilUtil::stripSlashes($_POST['description']));
273 $this->entry->setCopyright($this->stripSlashes($_POST['copyright']));
274 $this->entry->setLanguage('en');
275 $this->entry->setCopyrightAndOtherRestrictions(true);
276 $this->entry->setCosts(false);
277
278 if(!$this->entry->validate())
279 {
280 ilUtil::sendInfo($this->lng->txt('fill_out_all_required_fields'));
281 $this->addEntry();
282 return false;
283 }
284 $this->entry->add();
285 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
286 $this->showCopyrightSettings();
287 return true;
288 }
stripSlashes($a_str)
Special function to strip slashes for copyright fields.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $ilErr, addEntry(), ilUtil\sendInfo(), ilUtil\sendSuccess(), showCopyrightSettings(), stripSlashes(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveGeneralSettings()

ilObjMDSettingsGUI::saveGeneralSettings ( )

Save general settings.

Definition at line 182 of file class.ilObjMDSettingsGUI.php.

183 {
184 global $ilCtrl;
185
186 $delim = (trim($_POST['delimiter']) == "")
187 ? ","
188 : trim($_POST['delimiter']);
189 $this->md_settings->setDelimiter($delim);
190 $this->md_settings->save();
191 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
192
193 $ilCtrl->redirect($this, "showGeneralSettings");
194 }
global $ilCtrl
Definition: ilias.php:18

References $_POST, $ilCtrl, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ showCopyrightSettings()

ilObjMDSettingsGUI::showCopyrightSettings ( )

Edit copyright settings.

Definition at line 200 of file class.ilObjMDSettingsGUI.php.

201 {
202 $this->tabs_gui->setTabActive('md_copyright');
203 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.settings.html','Services/MetaData');
204
205 $this->initSettingsForm();
206 $this->tpl->setVariable('SETTINGS_TABLE',$this->form->getHTML());
207
208 include_once("./Services/MetaData/classes/class.ilMDCopyrightTableGUI.php");
209 $table_gui = new ilMDCopyrightTableGUI($this,'showCopyrightSettings');
210 $table_gui->setTitle($this->lng->txt("md_copyright_selection"));
211 $table_gui->parseSelections();
212// $table_gui->addCommandButton("updateCopyrightSelection", $this->lng->txt("save"));
213 $table_gui->addCommandButton('addEntry',$this->lng->txt('add'));
214 $table_gui->addMultiCommand("confirmDeleteEntries", $this->lng->txt("delete"));
215 $table_gui->setSelectAllCheckbox("entry_id");
216 $this->tpl->setVariable('COPYRIGHT_TABLE',$table_gui->getHTML());
217 }
initSettingsForm()
@access protected

References initSettingsForm().

Referenced by confirmDeleteEntries(), deleteEntries(), saveCopyrightSettings(), saveEntry(), and updateEntry().

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

◆ showGeneralSettings()

ilObjMDSettingsGUI::showGeneralSettings ( )

Edit general settings.

Definition at line 142 of file class.ilObjMDSettingsGUI.php.

143 {
144 global $tpl;
145
147 $tpl->setContent($this->form->getHTML());
148 }
initGeneralSettingsForm($a_mode="edit")
Init general settings form.

References ilObjectGUI\$tpl, and initGeneralSettingsForm().

+ Here is the call graph for this function:

◆ stripSlashes()

ilObjMDSettingsGUI::stripSlashes (   $a_str)
protected

Special function to strip slashes for copyright fields.

@access protected

Definition at line 479 of file class.ilObjMDSettingsGUI.php.

480 {
481 if (ini_get("magic_quotes_gpc"))
482 {
483 $a_str = stripslashes($a_str);
484 }
485 return $a_str;
486 }

Referenced by saveEntry(), and updateEntry().

+ Here is the caller graph for this function:

◆ updateEntry()

ilObjMDSettingsGUI::updateEntry ( )

update one entry

@access public

Definition at line 357 of file class.ilObjMDSettingsGUI.php.

358 {
359 global $ilErr;
360
361 include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
362 $this->entry = new ilMDCopyrightSelectionEntry((int) $_REQUEST['entry_id']);
363
364 $this->entry->setTitle(ilUtil::stripSlashes($_POST['title']));
365 $this->entry->setDescription(ilUtil::stripSlashes($_POST['description']));
366 $this->entry->setCopyright($this->stripSlashes($_POST['copyright']));
367
368 if(!$this->entry->validate())
369 {
370 ilUtil::sendInfo($this->lng->txt('fill_out_all_required_fields'));
371 $this->editEntry();
372 return false;
373 }
374 $this->entry->update();
375 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
376 $this->showCopyrightSettings();
377 return true;
378 }
editEntry()
edit one selection

References $_POST, $_REQUEST, $ilErr, editEntry(), ilUtil\sendInfo(), ilUtil\sendSuccess(), showCopyrightSettings(), stripSlashes(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

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