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

Class ilObjectMetaDataGUI. More...

+ Collaboration diagram for ilObjectMetaDataGUI:

Public Member Functions

 __construct (ilObject $a_object=null, $a_sub_type=null, $a_sub_id=null)
 Construct. More...
 
 executeCommand ()
 
 setTaxonomySettings (closure $a_form_manipulator, closure $a_form_saver)
 Set taxonomy settings. More...
 
 getTaxonomySettings ()
 Get taxonomy settings. More...
 
 enableTaxonomyDefinition ($a_enable)
 Enable taxonomy definition. More...
 
 getTaxonomyObjGUI ()
 Get taxonomy obj gui. More...
 
 addMDObserver ($a_class, $a_method, $a_section)
 
 setAdvMdRecordObject ($a_adv_ref_id, $a_adv_type, $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 getTab ($a_base_class=null)
 Get tab link if available. More...
 
 setSubTabs ($a_active)
 
 getBlockHTML (array $a_cmds=null, $a_callback=null)
 
 getKeyValueList ()
 

Protected Member Functions

 getLOMType ()
 
 isAdvMDAvailable ()
 
 isLOMAvailable ()
 
 hasAdvancedMDSettings ()
 
 hasActiveRecords ()
 check if active records exist in current path anf for object type More...
 
 canEdit ()
 
 initEditForm ()
 
 edit (ilPropertyFormGUI $a_form=null)
 
 update ()
 
 editTaxonomySettings ()
 
 initTaxonomySettingsForm ()
 Init taxonomy settings form. More...
 
 saveTaxonomySettings ()
 Save taxonomy settings form. More...
 

Protected Attributes

 $ctrl
 
 $tabs
 
 $lng
 
 $tpl
 
 $object
 
 $ref_id
 
 $obj_id
 
 $obj_type
 
 $sub_type
 
 $sub_id
 
 $md_observers
 
 $tax_md_gui = null
 
 $tax_obj_gui = null
 
 $taxonomy_settings_form_manipulator = null
 
 $taxonomy_settings_form_saver = null
 
 $adv_ref_id = null
 
 $adv_type = null
 
 $adv_subtype = null
 

Private Attributes

 $logger = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectMetaDataGUI::__construct ( ilObject  $a_object = null,
  $a_sub_type = null,
  $a_sub_id = null 
)

Construct.

Parameters
ilObject$a_object
string$a_sub_type
Returns
self

Definition at line 75 of file class.ilObjectMetaDataGUI.php.

76 {
77 global $DIC;
78
79 $this->ctrl = $DIC->ctrl();
80 $this->lng = $DIC->language();
81 $this->tpl = $DIC["tpl"];
82 $this->tabs = $DIC->tabs();
83
84
85 $this->logger = $GLOBALS['DIC']->logger()->obj();
86
87 $this->in_workspace = (bool) $_REQUEST["wsp_id"];
88
89 $this->sub_type = $a_sub_type;
90 $this->sub_id = $a_sub_id;
91
92
93
94 if (!$this->sub_type) {
95 $this->sub_type = "-";
96 }
97
98 if ($a_object) {
99 $this->object = $a_object;
100 $this->obj_id = $a_object->getId();
101 $this->obj_type = $a_object->getType();
102 $this->ref_id = $a_object->getRefId();
103
104 if (!$a_object->withReferences()) {
105 $this->logger->logStack(ilLogLevel::WARNING);
106 $this->logger->warning('ObjectMetaDataGUI called without valid reference id.');
107 }
108
109 if (!$this->ref_id) {
110 $this->logger->logStack(ilLogLevel::WARNING);
111 $this->logger->warning('ObjectMetaDataGUI called without valid reference id.');
112 }
113
114 $this->md_obj = new ilMD((int) $this->obj_id, (int) $this->sub_id, $this->getLOMType());
115
116 if (!$this->in_workspace) {
117 // (parent) container taxonomies?
118 include_once "Services/Taxonomy/classes/class.ilTaxMDGUI.php";
119 $this->tax_md_gui = new ilTaxMDGUI($this->md_obj->getRBACId(), $this->md_obj->getObjId(), $this->md_obj->getObjType(), $this->ref_id);
120 $tax_ids = $this->tax_md_gui->getSelectableTaxonomies();
121 if (!is_array($tax_ids) || count($tax_ids) == 0) {
122 $this->tax_md_gui = null;
123 }
124 }
125 }
126
127 $this->lng->loadLanguageModule("meta");
128 $this->lng->loadLanguageModule("tax");
129 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
getType()
get object type @access public
withReferences()
determines wehter objects are referenced or not (got ref ids or not)
getRefId()
get reference id @access public
getId()
get object id @access public
Taxonomies selection for metadata helper GUI.
global $DIC
Definition: goto.php:24

References $DIC, $GLOBALS, getLOMType(), and ilLogLevel\WARNING.

+ Here is the call graph for this function:

Member Function Documentation

◆ addMDObserver()

ilObjectMetaDataGUI::addMDObserver (   $a_class,
  $a_method,
  $a_section 
)

Definition at line 236 of file class.ilObjectMetaDataGUI.php.

237 {
238 $this->md_observers[] = array(
239 "class" => $a_class,
240 "method" => $a_method,
241 "section" => $a_section
242 );
243 }

◆ canEdit()

ilObjectMetaDataGUI::canEdit ( )
protected

Definition at line 360 of file class.ilObjectMetaDataGUI.php.

361 {
362 // if($this->hasActiveRecords() &&
363 // $this->obj_id)
364 // {
365 if ($this->hasActiveRecords()) {
366 if ($this->sub_type == "-" ||
367 $this->sub_id) {
368 return true;
369 }
370 }
371 return false;
372 }
hasActiveRecords()
check if active records exist in current path anf for object type

References hasActiveRecords().

Referenced by getTab(), and setSubTabs().

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

◆ edit()

ilObjectMetaDataGUI::edit ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 505 of file class.ilObjectMetaDataGUI.php.

506 {
508
509 if (!$a_form) {
510 $a_form = $this->initEditForm();
511 }
512
513 $tpl->setContent($a_form->getHTML());
514 }

References $tpl, and initEditForm().

Referenced by update().

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

◆ editTaxonomySettings()

ilObjectMetaDataGUI::editTaxonomySettings ( )
protected

Definition at line 623 of file class.ilObjectMetaDataGUI.php.

624 {
625 $this->tabs->activateSubTab("tax_settings");
626
627 $form = $this->initTaxonomySettingsForm();
628 $this->tpl->setContent($form->getHTML());
629 }
initTaxonomySettingsForm()
Init taxonomy settings form.

References initTaxonomySettingsForm().

+ Here is the call graph for this function:

◆ enableTaxonomyDefinition()

ilObjectMetaDataGUI::enableTaxonomyDefinition (   $a_enable)

Enable taxonomy definition.

Parameters

return

Definition at line 215 of file class.ilObjectMetaDataGUI.php.

216 {
217 if ($a_enable) {
218 $this->tax_obj_gui = new ilObjTaxonomyGUI();
219 $this->tax_obj_gui->setAssignedObject($this->object->getId());
220 } else {
221 $this->tax_obj_gui = null;
222 }
223 }
Taxonomy GUI class.

◆ executeCommand()

ilObjectMetaDataGUI::executeCommand ( )

Definition at line 131 of file class.ilObjectMetaDataGUI.php.

132 {
133 $ilCtrl = $this->ctrl;
134
135 $next_class = $ilCtrl->getNextClass($this);
136 $cmd = $ilCtrl->getCmd("edit");
137
138 switch ($next_class) {
139 case 'ilmdeditorgui':
140 $this->setSubTabs("lom");
141 include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
142 $md_gui = new ilMDEditorGUI((int) $this->obj_id, (int) $this->sub_id, $this->getLOMType());
143 // custom observers?
144 if (is_array($this->md_observers)) {
145 foreach ($this->md_observers as $observer) {
146 $md_gui->addObserver($observer["class"], $observer["method"], $observer["section"]);
147 }
148 }
149 // "default" repository object observer
150 elseif (!$this->sub_id &&
151 $this->object) {
152 $md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
153 }
154 $ilCtrl->forwardCommand($md_gui);
155 break;
156
157 case 'iladvancedmdsettingsgui':
158 $this->setSubTabs("advmddef");
159 include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDSettingsGUI.php';
160 $advmdgui = new ilAdvancedMDSettingsGUI($this->ref_id, $this->obj_type, $this->sub_type);
161 $ilCtrl->forwardCommand($advmdgui);
162 break;
163
164 case 'iltaxmdgui':
165 $this->setSubTabs("tax_assignment");
166 $ilCtrl->forwardCommand($this->tax_md_gui);
167 break;
168
169 case 'ilobjtaxonomygui':
170 $this->setSubTabs("tax_definition");
171 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
172 $ilCtrl->forwardCommand($this->tax_obj_gui);
173 break;
174
175 case "ilpropertyformgui":
176 // only case is currently adv metadata internal link in info settings, see #24497
177 $form = $this->initEditForm();
178 $ilCtrl->forwardCommand($form);
179 break;
180
181 default:
182 $this->setSubTabs("advmd");
183 $this->$cmd();
184 break;
185 }
186 }

References $ctrl, getLOMType(), initEditForm(), and setSubTabs().

+ Here is the call graph for this function:

◆ getAdvMdRecordObject()

ilObjectMetaDataGUI::getAdvMdRecordObject ( )

◆ getBlockHTML()

ilObjectMetaDataGUI::getBlockHTML ( array  $a_cmds = null,
  $a_callback = null 
)

Definition at line 547 of file class.ilObjectMetaDataGUI.php.

548 {
550
551 $html = "";
552
553 include_once "Services/Object/classes/class.ilObjectMetaDataBlockGUI.php";
554 include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php";
555 include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php";
558 $block = new ilObjectMetaDataBlockGUI($record, $a_callback);
559 $block->setValues(new ilAdvancedMDValues($record->getRecordId(), $this->obj_id, $this->sub_type, $this->sub_id));
560 if ($a_cmds) {
561 foreach ($a_cmds as $caption => $url) {
562 $block->addBlockCommand($url, $lng->txt($caption));
563 }
564 }
565 $html .= $block->getHTML();
566 }
567
568 return $html;
569 }
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
getAdvMdRecordObject()
Get adv md record type.
$url

References $adv_ref_id, $adv_subtype, $adv_type, $lng, $url, ilAdvancedMDRecord\_getSelectedRecordsByObject(), and getAdvMdRecordObject().

+ Here is the call graph for this function:

◆ getKeyValueList()

ilObjectMetaDataGUI::getKeyValueList ( )

Definition at line 577 of file class.ilObjectMetaDataGUI.php.

578 {
579 $html = "";
580 $sep = "";
581
584
585 include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php";
586 include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php";
589 $vals = new ilAdvancedMDValues($record->getRecordId(), $this->obj_id, $this->sub_type, $this->sub_id);
590
591
592 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
593 include_once('Services/ADT/classes/class.ilADTFactory.php');
594
595 // this correctly binds group and definitions
596 $vals->read();
597
598 $defs = $vals->getDefinitions();
599 foreach ($vals->getADTGroup()->getElements() as $element_id => $element) {
600 if ($element instanceof ilADTLocation) {
601 continue;
602 }
603
604 $html .= $sep . $defs[$element_id]->getTitle() . ": ";
605
606 if ($element->isNull()) {
607 $value = "-";
608 } else {
609 $value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
610
611 $value = $value->getHTML();
612 }
613 $html .= $value;
614 $sep = ",    ";
615 }
616 }
617
619
620 return $html;
621 }
static getInstance()
Get singleton.
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used

References $adv_ref_id, $adv_subtype, $adv_type, ilAdvancedMDRecord\_getSelectedRecordsByObject(), getAdvMdRecordObject(), ilADTFactory\getInstance(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

+ Here is the call graph for this function:

◆ getLOMType()

ilObjectMetaDataGUI::getLOMType ( )
protected

Definition at line 245 of file class.ilObjectMetaDataGUI.php.

246 {
247 if ($this->sub_type != "-" &&
248 $this->sub_id) {
249 return $this->sub_type;
250 } else {
251 return $this->obj_type;
252 }
253 }

References $obj_type, and $sub_type.

Referenced by __construct(), executeCommand(), and isLOMAvailable().

+ Here is the caller graph for this function:

◆ getTab()

ilObjectMetaDataGUI::getTab (   $a_base_class = null)

Get tab link if available.

Parameters
null$a_base_class
Returns
null|string

Definition at line 380 of file class.ilObjectMetaDataGUI.php.

381 {
382 $ilCtrl = $this->ctrl;
383
384 if (!$a_base_class) {
385 $path = array();
386 } else {
387 $path = array($a_base_class);
388 }
389 $path[] = "ilobjectmetadatagui";
390
391 $link = null;
392 if ($this->isLOMAvailable()) {
393 $path[] = "ilmdeditorgui";
394 $link = $ilCtrl->getLinkTargetByClass($path, "listSection");
395 } elseif ($this->isAdvMDAvailable()) {
396 if ($this->canEdit()) {
397 $link = $ilCtrl->getLinkTarget($this, "edit");
398 } elseif ($this->hasAdvancedMDSettings()) {
399 $path[] = "iladvancedmdsettingsgui";
400 $link = $ilCtrl->getLinkTargetByClass($path, "showRecords");
401 }
402 }
403 if ($link == null && is_object($this->tax_obj_gui)) { // taxonomy definition available?
404 $path[] = "ilobjtaxonomygui";
405 $link = $ilCtrl->getLinkTargetByClass($path, "");
406 }
407 return $link;
408 }

References $ctrl, canEdit(), hasAdvancedMDSettings(), isAdvMDAvailable(), and isLOMAvailable().

+ Here is the call graph for this function:

◆ getTaxonomyObjGUI()

ilObjectMetaDataGUI::getTaxonomyObjGUI ( )

Get taxonomy obj gui.

Returns
ilObjTaxonomyGUI|null

Definition at line 230 of file class.ilObjectMetaDataGUI.php.

References $tax_obj_gui.

◆ getTaxonomySettings()

ilObjectMetaDataGUI::getTaxonomySettings ( )

Get taxonomy settings.

Returns
string link traget

Definition at line 204 of file class.ilObjectMetaDataGUI.php.

205 {
206 return $this->taxonomy_settings;
207 }

◆ hasActiveRecords()

ilObjectMetaDataGUI::hasActiveRecords ( )
protected

check if active records exist in current path anf for object type

Returns
type

Definition at line 346 of file class.ilObjectMetaDataGUI.php.

347 {
348 include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
349
351
352 return
354 $adv_type,
357 ));
358 }

References $adv_ref_id, $adv_subtype, $adv_type, ilAdvancedMDRecord\_getSelectedRecordsByObject(), and getAdvMdRecordObject().

Referenced by canEdit().

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

◆ hasAdvancedMDSettings()

ilObjectMetaDataGUI::hasAdvancedMDSettings ( )
protected

Definition at line 326 of file class.ilObjectMetaDataGUI.php.

327 {
328 if ($this->sub_id) {
329 return false;
330 }
331
332 include_once 'Services/Container/classes/class.ilContainer.php';
333 include_once 'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
334
336 $this->obj_id,
338 false
339 );
340 }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.

References ilContainer\_lookupContainerSetting(), and ilObjectServiceSettingsGUI\CUSTOM_METADATA.

Referenced by getTab(), and setSubTabs().

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

◆ initEditForm()

ilObjectMetaDataGUI::initEditForm ( )
protected

Definition at line 474 of file class.ilObjectMetaDataGUI.php.

475 {
476 $ilCtrl = $this->ctrl;
478
479 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
480 $form = new ilPropertyFormGUI();
481 $form->setFormAction($ilCtrl->getFormAction($this, "update"));
482 $form->setTitle($lng->txt("meta_tab_advmd"));
483
484 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
485 $this->record_gui = new ilAdvancedMDRecordGUI(
487 $this->obj_type,
488 $this->obj_id,
489 $this->sub_type,
490 $this->sub_id
491 );
492
493 if ($this->adv_type != "") {
494 $this->record_gui->setAdvMdRecordObject($this->adv_ref_id, $this->adv_type, $this->adv_subtype);
495 }
496
497 $this->record_gui->setPropertyForm($form);
498 $this->record_gui->parse();
499
500 $form->addCommandButton("update", $lng->txt("save"));
501
502 return $form;
503 }
This class represents a property form user interface.

References $ctrl, $lng, and ilAdvancedMDRecordGUI\MODE_EDITOR.

Referenced by edit(), executeCommand(), and update().

+ Here is the caller graph for this function:

◆ initTaxonomySettingsForm()

ilObjectMetaDataGUI::initTaxonomySettingsForm ( )
protected

Init taxonomy settings form.

Definition at line 634 of file class.ilObjectMetaDataGUI.php.

635 {
636 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
637 $form = new ilPropertyFormGUI();
638 $form->setFormAction($this->ctrl->getFormAction($this), "saveTaxonomySettings");
639 $form->setTitle($this->lng->txt("tax_tax_settings"));
640 $this->taxonomy_settings_form_manipulator->bindTo($this);
641 call_user_func_array($this->taxonomy_settings_form_manipulator, [$form]);
642 $form->addCommandButton("saveTaxonomySettings", $this->lng->txt("save"));
643
644 return $form;
645 }

Referenced by editTaxonomySettings(), and saveTaxonomySettings().

+ Here is the caller graph for this function:

◆ isAdvMDAvailable()

ilObjectMetaDataGUI::isAdvMDAvailable ( )
protected

Definition at line 282 of file class.ilObjectMetaDataGUI.php.

283 {
284 // $this->setAdvMdRecordObject(70,"mep", "mob");
285 include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
286 foreach (ilAdvancedMDRecord::_getAssignableObjectTypes(false) as $item) {
288
289 // echo ("<br>".$item["obj_type"]."-".$adv_type."-".$adv_subtype);
290 if ($item["obj_type"] == $adv_type) {
291 // ("<br>-- ".$adv_type."-".$adv_subtype);
292 // exit;
293 return ((!$item["sub_type"] && $adv_subtype == "-") ||
294 ($item["sub_type"] == $adv_subtype));
295 }
296 }
297 // exit;
298 return false;
299 }
static _getAssignableObjectTypes($a_include_text=false)
Get assignable object type.

References $adv_ref_id, $adv_subtype, $adv_type, ilAdvancedMDRecord\_getAssignableObjectTypes(), and getAdvMdRecordObject().

Referenced by getTab(), and setSubTabs().

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

◆ isLOMAvailable()

ilObjectMetaDataGUI::isLOMAvailable ( )
protected

Definition at line 301 of file class.ilObjectMetaDataGUI.php.

302 {
303 $type = $this->getLOMType();
304 if ($type == $this->sub_type) {
305 $type = $this->obj_type . ":" . $type;
306 }
307
308 return (($this->obj_id || !$this->obj_type) &&
309 in_array($type, array(
310 "crs",
311 'grp',
312 "file",
313 "glo", "glo:gdf",
314 "svy", "spl",
315 "tst", "qpl",
316 ":mob",
317 "webr",
318 "htlm",
319 "lm", "lm:st", "lm:pg",
320 "sahs", "sahs:sco", "sahs:page",
321 'sess', "iass",
322 'exc', 'lti', 'cmix'
323 )));
324 }
$type

References $type, and getLOMType().

Referenced by getTab(), and setSubTabs().

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

◆ saveTaxonomySettings()

ilObjectMetaDataGUI::saveTaxonomySettings ( )
protected

Save taxonomy settings form.

Definition at line 650 of file class.ilObjectMetaDataGUI.php.

651 {
652 $form = $this->initTaxonomySettingsForm();
653 if ($form->checkInput()) {
654 $this->taxonomy_settings_form_saver->bindTo($this);
655 call_user_func_array($this->taxonomy_settings_form_saver, [$form]);
656 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
657 $this->ctrl->redirect($this, "editTaxonomySettings");
658 } else {
659 $form->setValuesByPost();
660 $this->tpl->setContent($form->getHtml());
661 }
662 }

References initTaxonomySettingsForm().

+ Here is the call graph for this function:

◆ setAdvMdRecordObject()

ilObjectMetaDataGUI::setAdvMdRecordObject (   $a_adv_ref_id,
  $a_adv_type,
  $a_adv_subtype = "-" 
)

Set object, that defines the adv md records being used.

Default is $this->object, but the context may set another object (e.g. media pool for media objects)

Parameters
string$a_valadv type

Definition at line 261 of file class.ilObjectMetaDataGUI.php.

262 {
263 $this->adv_ref_id = $a_adv_ref_id;
264 $this->adv_type = $a_adv_type;
265 $this->adv_subtype = $a_adv_subtype;
266 }

◆ setSubTabs()

ilObjectMetaDataGUI::setSubTabs (   $a_active)

Definition at line 410 of file class.ilObjectMetaDataGUI.php.

411 {
412 $ilTabs = $this->tabs;
414 $ilCtrl = $this->ctrl;
415
416 if ($this->isLOMAvailable()) {
417 $ilTabs->addSubTab(
418 "lom",
419 $lng->txt("meta_tab_lom"),
420 $ilCtrl->getLinkTargetByClass("ilmdeditorgui", "listSection")
421 );
422 }
423 if ($this->isAdvMDAvailable()) {
424 if ($this->canEdit()) {
425 $ilTabs->addSubTab(
426 "advmd",
427 $lng->txt("meta_tab_advmd"),
428 $ilCtrl->getLinkTarget($this, "edit")
429 );
430 }
431 if ($this->hasAdvancedMDSettings()) {
432 $ilTabs->addSubTab(
433 "advmddef",
434 $lng->txt("meta_tab_advmd_def"),
435 $ilCtrl->getLinkTargetByClass("iladvancedmdsettingsgui", "showRecords")
436 );
437
438 $ilTabs->addSubTab(
439 "md_adv_file_list",
440 $lng->txt("md_adv_file_list"),
441 $ilCtrl->getLinkTargetByClass("iladvancedmdsettingsgui", "showFiles")
442 );
443 }
444 }
445
446 if ($this->tax_md_gui != null) {
447 $this->tax_md_gui->addSubTab();
448 }
449
450 if ($this->tax_obj_gui != null) {
451 $ilTabs->addSubTab(
452 "tax_definition",
453 $lng->txt("cntr_taxonomy_definitions"),
454 $ilCtrl->getLinkTargetByClass("ilobjtaxonomygui", "")
455 );
456 }
457
458 if ($this->taxonomy_settings_form_manipulator != null) {
459 $ilTabs->addSubTab(
460 "tax_settings",
461 $lng->txt("tax_tax_settings"),
462 $ilCtrl->getLinkTarget($this, "editTaxonomySettings")
463 );
464 }
465
466 $ilTabs->activateSubTab($a_active);
467 }

References $ctrl, $lng, $tabs, canEdit(), hasAdvancedMDSettings(), isAdvMDAvailable(), and isLOMAvailable().

Referenced by executeCommand().

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

◆ setTaxonomySettings()

ilObjectMetaDataGUI::setTaxonomySettings ( closure  $a_form_manipulator,
closure  $a_form_saver 
)

Set taxonomy settings.

Parameters
string$a_linklink traget

Definition at line 193 of file class.ilObjectMetaDataGUI.php.

194 {
195 $this->taxonomy_settings_form_manipulator = $a_form_manipulator;
196 $this->taxonomy_settings_form_saver = $a_form_saver;
197 }

◆ update()

ilObjectMetaDataGUI::update ( )
protected

Definition at line 516 of file class.ilObjectMetaDataGUI.php.

517 {
519 $ilCtrl = $this->ctrl;
520
521 $form = $this->initEditForm();
522 if (
523 $form->checkInput() &&
524 $this->record_gui->importEditFormPostValues()) {
525 $this->record_gui->writeEditForm();
526
527 // Update ECS content
528 if ($this->obj_type == "crs") {
529 include_once "Modules/Course/classes/class.ilECSCourseSettings.php";
530 $ecs = new ilECSCourseSettings($this->object);
531 $ecs->handleContentUpdate();
532 }
533
534 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
535 $ilCtrl->redirect($this, "edit");
536 }
537
538 $form->setValuesByPost();
539 $this->edit($form);
540 }
Class ilECSCourseSettings.
edit(ilPropertyFormGUI $a_form=null)

References $ctrl, $lng, edit(), and initEditForm().

+ Here is the call graph for this function:

Field Documentation

◆ $adv_ref_id

ilObjectMetaDataGUI::$adv_ref_id = null
protected

◆ $adv_subtype

ilObjectMetaDataGUI::$adv_subtype = null
protected

◆ $adv_type

ilObjectMetaDataGUI::$adv_type = null
protected

◆ $ctrl

ilObjectMetaDataGUI::$ctrl
protected

◆ $lng

ilObjectMetaDataGUI::$lng
protected

Definition at line 27 of file class.ilObjectMetaDataGUI.php.

Referenced by getBlockHTML(), initEditForm(), setSubTabs(), and update().

◆ $logger

ilObjectMetaDataGUI::$logger = null
private

Definition at line 45 of file class.ilObjectMetaDataGUI.php.

◆ $md_observers

ilObjectMetaDataGUI::$md_observers
protected

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

◆ $obj_id

ilObjectMetaDataGUI::$obj_id
protected

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

◆ $obj_type

ilObjectMetaDataGUI::$obj_type
protected

Definition at line 37 of file class.ilObjectMetaDataGUI.php.

Referenced by getAdvMdRecordObject(), and getLOMType().

◆ $object

ilObjectMetaDataGUI::$object
protected

Definition at line 34 of file class.ilObjectMetaDataGUI.php.

◆ $ref_id

ilObjectMetaDataGUI::$ref_id
protected

Definition at line 35 of file class.ilObjectMetaDataGUI.php.

Referenced by getAdvMdRecordObject().

◆ $sub_id

ilObjectMetaDataGUI::$sub_id
protected

Definition at line 39 of file class.ilObjectMetaDataGUI.php.

◆ $sub_type

ilObjectMetaDataGUI::$sub_type
protected

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

Referenced by getAdvMdRecordObject(), and getLOMType().

◆ $tabs

ilObjectMetaDataGUI::$tabs
protected

Definition at line 22 of file class.ilObjectMetaDataGUI.php.

Referenced by setSubTabs().

◆ $tax_md_gui

ilObjectMetaDataGUI::$tax_md_gui = null
protected

Definition at line 47 of file class.ilObjectMetaDataGUI.php.

◆ $tax_obj_gui

ilObjectMetaDataGUI::$tax_obj_gui = null
protected

Definition at line 48 of file class.ilObjectMetaDataGUI.php.

Referenced by getTaxonomyObjGUI().

◆ $taxonomy_settings_form_manipulator

ilObjectMetaDataGUI::$taxonomy_settings_form_manipulator = null
protected

Definition at line 49 of file class.ilObjectMetaDataGUI.php.

◆ $taxonomy_settings_form_saver

ilObjectMetaDataGUI::$taxonomy_settings_form_saver = null
protected

Definition at line 50 of file class.ilObjectMetaDataGUI.php.

◆ $tpl

ilObjectMetaDataGUI::$tpl
protected

Definition at line 32 of file class.ilObjectMetaDataGUI.php.

Referenced by edit().


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