ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjectMetaDataGUI Class Reference

Class ilObjectMetaDataGUI. More...

+ Collaboration diagram for ilObjectMetaDataGUI:

Public Member Functions

 __construct (?ilObject $object=null, $sub_type=null, ?int $sub_id=null, bool $in_repository=true)
 
 executeCommand ()
 
 setTaxonomySettings (Closure $form_manipulator, Closure $form_saver)
 
 setRecordFilter (?array $filter=null)
 Set advanced record filter. More...
 
 enableTaxonomyDefinition (bool $enable)
 Enable taxonomy definition. More...
 
 getTaxonomyObjGUI ()
 
 addMDObserver (object $class, string $method, string $section)
 
 setAdvMdRecordObject (int $adv_id, string $adv_type, string $adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 getTab (?string $base_class=null)
 Get tab link if available. More...
 
 setSubTabs (string $active)
 
 getBlockHTML (?array $commands=null, ?array $callback=null)
 Takes as an optional second input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method. More...
 
 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 ()
 
 checkFilter (int $record_id)
 
 editTaxonomySettings ()
 
 initTaxonomySettingsForm ()
 
 saveTaxonomySettings ()
 

Protected Attributes

ilCtrl $ctrl
 
ilTabsGUI $tabs
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilLogger $logger = null
 
bool $in_workspace
 
 $sub_type
 
int $sub_id
 
bool $in_repository = true
 
ilObject $object
 
int $obj_id = 0
 
string $obj_type = ""
 
int $ref_id = 0
 
array $md_observers = null
 
ilTaxMDGUI $tax_md_gui = null
 
ilObjTaxonomyGUI $tax_obj_gui = null
 
Closure $taxonomy_settings_form_manipulator = null
 
Closure $taxonomy_settings_form_saver = null
 
ilAdvancedMDRecordGUI $record_gui = null
 
int $adv_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
array $record_filter = null
 

Private Attributes

ilObjectRequestRetriever $retriever
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectMetaDataGUI::__construct ( ?ilObject  $object = null,
  $sub_type = null,
?int  $sub_id = null,
bool  $in_repository = true 
)

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

77 {
78 global $DIC;
79
80 $this->ctrl = $DIC->ctrl();
81 $this->tabs = $DIC->tabs();
82 $this->lng = $DIC->language();
83 $this->tpl = $DIC["tpl"];
84 $this->logger = $GLOBALS['DIC']->logger()->obj();
85 $this->retriever = new ilObjectRequestRetriever($DIC->http()->wrapper(), $DIC->refinery());
86
87 $this->in_workspace = ((int) $this->retriever->getMaybeInt("wsp_id")) > 0;
88
89 $this->sub_type = $sub_type;
90 $this->sub_id = $sub_id;
91 $this->in_repository = $in_repository;
92
93 if (!$this->sub_type) {
94 $this->sub_type = "-";
95 }
96
97 if ($object) {
98 $this->object = $object;
99 $this->obj_id = $object->getId();
100 $this->obj_type = $object->getType();
101 if ($in_repository) {
102 $this->ref_id = $object->getRefId();
103 if (!$object->withReferences()) {
104 $this->logger->logStack(ilLogLevel::WARNING);
105 $this->logger->warning('ObjectMetaDataGUI called without valid reference id.');
106 }
107
108 if (!$this->ref_id) {
109 $this->logger->logStack(ilLogLevel::WARNING);
110 $this->logger->warning('ObjectMetaDataGUI called without valid reference id.');
111 }
112 }
113
114 if (!$this->in_workspace && $in_repository) {
115 // (parent) container taxonomies?
116 $this->tax_md_gui = new ilTaxMDGUI(
117 $this->obj_id,
118 (int) $this->sub_id === 0 ? $this->obj_id : (int) $this->sub_id,
119 $this->getLOMType(),
120 $this->ref_id
121 );
122 $tax_ids = $this->tax_md_gui->getSelectableTaxonomies();
123 if (!is_array($tax_ids) || count($tax_ids) == 0) {
124 $this->tax_md_gui = null;
125 }
126 }
127 }
128
129 $this->lng->loadLanguageModule("meta");
130 $this->lng->loadLanguageModule("tax");
131 }
Base class for all sub item list gui's.
withReferences()
determines whether objects are referenced or not (got ref ids or not)
Taxonomies selection for metadata helper GUI.
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54

References $DIC, $GLOBALS, $in_repository, $object, $sub_id, $sub_type, ILIAS\Repository\ctrl(), ilObject\getId(), getLOMType(), ilObject\getRefId(), ilObject\getType(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\tabs(), ilLogLevel\WARNING, and ilObject\withReferences().

+ Here is the call graph for this function:

Member Function Documentation

◆ addMDObserver()

ilObjectMetaDataGUI::addMDObserver ( object  $class,
string  $method,
string  $section 
)

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

227 : void
228 {
229 $this->md_observers[] = [
230 "class" => $class,
231 "method" => $method,
232 "section" => $section
233 ];
234 }

◆ canEdit()

ilObjectMetaDataGUI::canEdit ( )
protected

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

356 : bool
357 {
358 if (is_array($this->sub_type)) { // only settings
359 return false;
360 }
361
362 if ($this->hasActiveRecords()) {
363 if ($this->sub_type == "-" || $this->sub_id) {
364 return true;
365 }
366 }
367 return false;
368 }
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:

◆ checkFilter()

ilObjectMetaDataGUI::checkFilter ( int  $record_id)
protected

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

512 : bool
513 {
514 return !(is_array($this->record_filter) && !in_array($record_id, $this->record_filter));
515 }

Referenced by getBlockHTML().

+ Here is the caller graph for this function:

◆ edit()

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

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

483 : void
484 {
485 if (!$a_form) {
486 $a_form = $this->initEditForm();
487 }
488
489 $this->tpl->setContent($a_form->getHTML());
490 }

References 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 603 of file class.ilObjectMetaDataGUI.php.

603 : void
604 {
605 $this->tabs->activateSubTab("tax_settings");
606 $form = $this->initTaxonomySettingsForm();
607 $this->tpl->setContent($form->getHTML());
608 }

References initTaxonomySettingsForm(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ enableTaxonomyDefinition()

ilObjectMetaDataGUI::enableTaxonomyDefinition ( bool  $enable)

Enable taxonomy definition.

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

212 : void
213 {
214 if ($enable) {
215 $this->tax_obj_gui = new ilObjTaxonomyGUI();
216 $this->tax_obj_gui->setAssignedObject($this->object->getId());
217 } else {
218 $this->tax_obj_gui = null;
219 }
220 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjectMetaDataGUI::executeCommand ( )

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

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

References ilAdvancedMDSettingsGUI\CONTEXT_OBJECT, ILIAS\Repository\ctrl(), getLOMType(), initEditForm(), and setSubTabs().

+ Here is the call graph for this function:

◆ getAdvMdRecordObject()

ilObjectMetaDataGUI::getAdvMdRecordObject ( )

Get adv md record type.

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

258 : array
259 {
260 if ($this->adv_type == null) {
261 if ($this->in_repository) {
263 } else {
265 }
266 }
268 }

References $adv_id, $adv_subtype, $adv_type, $obj_id, $obj_type, $ref_id, and $sub_type.

Referenced by getBlockHTML(), getKeyValueList(), hasActiveRecords(), and isAdvMDAvailable().

+ Here is the caller graph for this function:

◆ getBlockHTML()

ilObjectMetaDataGUI::getBlockHTML ( ?array  $commands = null,
?array  $callback = null 
)

Takes as an optional second input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method.

Parameters
array | null$commands
null|array{0ilObject, 1: string} $callback
Returns
string

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

525 : string
526 {
527 $html = "";
528
531 $adv_type,
532 $adv_id,
534 $this->in_repository
535 );
536 foreach ($advanced_md_records as $record) {
537 if (!$this->checkFilter($record->getRecordId())) {
538 continue;
539 }
540 $block = new ilObjectMetaDataBlockGUI($record, $callback);
541 $block->setValues(new ilAdvancedMDValues(
542 $record->getRecordId(),
543 $this->obj_id,
544 $this->sub_type,
545 (int) $this->sub_id
546 ));
547 if ($commands) {
548 foreach ($commands as $caption => $url) {
549 $block->addBlockCommand($url, $this->lng->txt($caption));
550 }
551 }
552 $html .= $block->getHTML();
553 }
554
555 return $html;
556 }
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
getAdvMdRecordObject()
Get adv md record type.
$url
Definition: shib_logout.php:68

References $adv_id, $adv_subtype, $adv_type, $url, ilAdvancedMDRecord\_getSelectedRecordsByObject(), checkFilter(), getAdvMdRecordObject(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getKeyValueList()

ilObjectMetaDataGUI::getKeyValueList ( )

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

558 : string
559 {
560 $html = "";
561 $sep = "";
562
565
568 $adv_type,
569 $adv_id,
571 $this->in_repository
572 );
573 foreach ($advanced_md_records as $record) {
574 $vals = new ilAdvancedMDValues($record->getRecordId(), $this->obj_id, $this->sub_type, (int) $this->sub_id);
575
576 // this correctly binds group and definitions
577 $vals->read();
578
579 $defs = $vals->getDefinitions();
580 foreach ($vals->getADTGroup()->getElements() as $element_id => $element) {
581 if ($element instanceof ilADTLocation) {
582 continue;
583 }
584
585 $html .= $sep . $defs[$element_id]->getTitle() . ": ";
586
587 if ($element->isNull()) {
588 $value = "-";
589 } else {
590 $value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
591
592 $value = $value->getHTML();
593 }
594 $html .= $value;
595 $sep = ",    ";
596 }
597 }
598
600 return $html;
601 }
static setUseRelativeDates(bool $a_status)
set use relative dates

References $adv_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 236 of file class.ilObjectMetaDataGUI.php.

236 : string
237 {
238 if ($this->sub_type != "-" && $this->sub_id) {
239 return $this->sub_type;
240 }
241 return $this->obj_type;
242 }

References $obj_type, and $sub_type.

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

+ Here is the caller graph for this function:

◆ getTab()

ilObjectMetaDataGUI::getTab ( ?string  $base_class = null)

Get tab link if available.

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

373 : ?string
374 {
375 if (!$base_class) {
376 $path = [];
377 } else {
378 $path = [$base_class];
379 }
380 $path[] = "ilobjectmetadatagui";
381
382 $link = null;
383 if ($this->isLOMAvailable()) {
384 $path[] = "ilmdeditorgui";
385 $link = $this->ctrl->getLinkTargetByClass($path, "listSection");
386 } elseif ($this->isAdvMDAvailable()) {
387 if ($this->canEdit()) {
388 $link = $this->ctrl->getLinkTarget($this, "edit");
389 } elseif ($this->hasAdvancedMDSettings()) {
390 $path[] = "iladvancedmdsettingsgui";
391 $link = $this->ctrl->getLinkTargetByClass($path, "showRecords");
392 }
393 }
394 if ($link == null && is_object($this->tax_obj_gui)) { // taxonomy definition available?
395 $path[] = "ilobjtaxonomygui";
396 $link = $this->ctrl->getLinkTargetByClass($path, "");
397 }
398 return $link;
399 }
$path
Definition: ltiservices.php:30

References $path, canEdit(), ILIAS\Repository\ctrl(), hasAdvancedMDSettings(), isAdvMDAvailable(), and isLOMAvailable().

+ Here is the call graph for this function:

◆ getTaxonomyObjGUI()

ilObjectMetaDataGUI::getTaxonomyObjGUI ( )

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

223 {
224 return $this->tax_obj_gui;
225 }

References $tax_obj_gui.

◆ hasActiveRecords()

ilObjectMetaDataGUI::hasActiveRecords ( )
protected

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

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

344 : bool
345 {
347
349 $adv_type,
350 $adv_id,
352 $this->in_repository
353 ));
354 }

References $adv_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 329 of file class.ilObjectMetaDataGUI.php.

329 : bool
330 {
331 if ($this->sub_id) {
332 return false;
333 }
334
336 $this->obj_id,
338 );
339 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)

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 456 of file class.ilObjectMetaDataGUI.php.

457 {
458 $form = new ilPropertyFormGUI();
459 $form->setFormAction($this->ctrl->getFormAction($this, "update"));
460 $form->setTitle($this->lng->txt("meta_tab_advmd"));
461
462 $this->record_gui = new ilAdvancedMDRecordGUI(
464 $this->obj_type,
465 $this->obj_id,
466 $this->sub_type,
467 (int) $this->sub_id,
468 $this->in_repository
469 );
470
471 if ($this->adv_type != "") {
472 $this->record_gui->setAdvMdRecordObject($this->adv_id, $this->adv_type, $this->adv_subtype);
473 }
474
475 $this->record_gui->setPropertyForm($form);
476 $this->record_gui->parse();
477
478 $form->addCommandButton("update", $this->lng->txt("save"));
479
480 return $form;
481 }
This class represents a property form user interface.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilAdvancedMDRecordGUI\MODE_EDITOR.

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

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

◆ initTaxonomySettingsForm()

ilObjectMetaDataGUI::initTaxonomySettingsForm ( )
protected

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

611 {
612 $form = new ilPropertyFormGUI();
613 $form->setFormAction($this->ctrl->getFormAction($this));
614 $form->setTitle($this->lng->txt("tax_tax_settings"));
615 $this->taxonomy_settings_form_manipulator->bindTo($this);
616 call_user_func_array($this->taxonomy_settings_form_manipulator, [$form]);
617 $form->addCommandButton("saveTaxonomySettings", $this->lng->txt("save"));
618
619 return $form;
620 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by editTaxonomySettings(), and saveTaxonomySettings().

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

◆ isAdvMDAvailable()

ilObjectMetaDataGUI::isAdvMDAvailable ( )
protected

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

270 : bool
271 {
273 list(, $adv_type, $adv_subtype) = $this->getAdvMdRecordObject();
274
275 if ($item["obj_type"] == $adv_type) {
276 if ((!$item["sub_type"] && $adv_subtype == "-") ||
277 ($item["sub_type"] == $adv_subtype) ||
278 (is_array($adv_subtype) && in_array($item["sub_type"], $adv_subtype))
279 ) {
280 return true;
281 }
282 }
283 }
284 return false;
285 }
static _getAssignableObjectTypes(bool $a_include_text=false)
Get assignable object type @access public.

References $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 287 of file class.ilObjectMetaDataGUI.php.

287 : bool
288 {
289 $type = $this->getLOMType();
290 if ($type == $this->sub_type) {
291 $type = $this->obj_type . ":" . $type;
292 }
293
294 return (
295 ($this->obj_id || !$this->obj_type) &&
296 in_array($type, [
297 'blog',
298 "crs",
299 'grp',
300 "file",
301 'dcl',
302 "glo",
303 "svy",
304 "spl",
305 "tst",
306 "qpl",
307 ":mob",
308 'mcst',
309 "webr",
310 "htlm",
311 "lm",
312 "lm:st",
313 "lm:pg",
314 "sahs",
315 "sahs:sco",
316 "sahs:page",
317 'sess',
318 "iass",
319 'exc',
320 'lti',
321 'cmix',
322 'mep',
323 'mep:mpg',
324 'wiki'
325 ])
326 );
327 }

References 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

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

622 : void
623 {
624 $form = $this->initTaxonomySettingsForm();
625 if ($form->checkInput()) {
626 $this->taxonomy_settings_form_saver->bindTo($this);
627 call_user_func_array($this->taxonomy_settings_form_saver, [$form]);
628 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
629 $this->ctrl->redirect($this, "editTaxonomySettings");
630 } else {
631 $form->setValuesByPost();
632 $this->tpl->setContent($form->getHTML());
633 }
634 }

References ILIAS\Repository\ctrl(), initTaxonomySettingsForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ setAdvMdRecordObject()

ilObjectMetaDataGUI::setAdvMdRecordObject ( int  $adv_id,
string  $adv_type,
string  $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)

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

248 : void
249 {
250 $this->adv_id = $adv_id;
251 $this->adv_type = $adv_type;
252 $this->adv_subtype = $adv_subtype;
253 }

References $adv_id, $adv_subtype, and $adv_type.

◆ setRecordFilter()

ilObjectMetaDataGUI::setRecordFilter ( ?array  $filter = null)

Set advanced record filter.

Parameters
?int[]$filter

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

204 : void
205 {
206 $this->record_filter = $filter;
207 }

◆ setSubTabs()

ilObjectMetaDataGUI::setSubTabs ( string  $active)

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

401 : void
402 {
403 if ($this->isLOMAvailable()) {
404 $this->tabs->addSubTab(
405 "lom",
406 $this->lng->txt("meta_tab_lom"),
407 $this->ctrl->getLinkTargetByClass("ilmdeditorgui", "listSection")
408 );
409 }
410 if ($this->isAdvMDAvailable()) {
411 if ($this->canEdit()) {
412 $this->tabs->addSubTab(
413 "advmd",
414 $this->lng->txt("meta_tab_advmd"),
415 $this->ctrl->getLinkTarget($this, "edit")
416 );
417 }
418 if ($this->hasAdvancedMDSettings()) {
419 $this->tabs->addSubTab(
420 "advmddef",
421 $this->lng->txt("meta_tab_advmd_def"),
422 $this->ctrl->getLinkTargetByClass("iladvancedmdsettingsgui", "showRecords")
423 );
424
425 $this->tabs->addSubTab(
426 "md_adv_file_list",
427 $this->lng->txt("md_adv_file_list"),
428 $this->ctrl->getLinkTargetByClass("iladvancedmdsettingsgui", "showFiles")
429 );
430 }
431 }
432
433 if ($this->tax_md_gui != null) {
434 $this->tax_md_gui->addSubTab();
435 }
436
437 if ($this->tax_obj_gui != null) {
438 $this->tabs->addSubTab(
439 "tax_definition",
440 $this->lng->txt("cntr_taxonomy_definitions"),
441 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", "")
442 );
443 }
444
445 if ($this->taxonomy_settings_form_manipulator != null) {
446 $this->tabs->addSubTab(
447 "tax_settings",
448 $this->lng->txt("tax_tax_settings"),
449 $this->ctrl->getLinkTarget($this, "editTaxonomySettings")
450 );
451 }
452
453 $this->tabs->activateSubTab($active);
454 }

References canEdit(), hasAdvancedMDSettings(), isAdvMDAvailable(), isLOMAvailable(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

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

◆ setTaxonomySettings()

ilObjectMetaDataGUI::setTaxonomySettings ( Closure  $form_manipulator,
Closure  $form_saver 
)

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

194 : void
195 {
196 $this->taxonomy_settings_form_manipulator = $form_manipulator;
197 $this->taxonomy_settings_form_saver = $form_saver;
198 }

◆ update()

ilObjectMetaDataGUI::update ( )
protected

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

492 : void
493 {
494 $form = $this->initEditForm();
495 if ($form->checkInput() && $this->record_gui->importEditFormPostValues()) {
496 $this->record_gui->writeEditForm();
497
498 // Update ECS content
499 if ($this->obj_type == "crs") {
500 $ecs = new ilECSCourseSettings($this->object);
501 $ecs->handleContentUpdate();
502 }
503
504 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
505 $this->ctrl->redirect($this, "edit");
506 }
507
508 $form->setValuesByPost();
509 $this->edit($form);
510 }
Class ilECSCourseSettings.
edit(?ilPropertyFormGUI $a_form=null)

References ILIAS\Repository\ctrl(), edit(), initEditForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $adv_id

int ilObjectMetaDataGUI::$adv_id = null
protected

◆ $adv_subtype

string ilObjectMetaDataGUI::$adv_subtype = null
protected

◆ $adv_type

string ilObjectMetaDataGUI::$adv_type = null
protected

◆ $ctrl

ilCtrl ilObjectMetaDataGUI::$ctrl
protected

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

◆ $in_repository

int ref id or obj id depending on ilObjectMetaDataGUI::$in_repository = true
protected

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

Referenced by __construct().

◆ $in_workspace

bool ilObjectMetaDataGUI::$in_workspace
protected

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

◆ $lng

ilLanguage ilObjectMetaDataGUI::$lng
protected

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

◆ $logger

ilLogger ilObjectMetaDataGUI::$logger = null
protected

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

◆ $md_observers

array ilObjectMetaDataGUI::$md_observers = null
protected

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

◆ $obj_id

int ilObjectMetaDataGUI::$obj_id = 0
protected

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

Referenced by getAdvMdRecordObject().

◆ $obj_type

string ilObjectMetaDataGUI::$obj_type = ""
protected

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

Referenced by getAdvMdRecordObject(), and getLOMType().

◆ $object

ilObject ilObjectMetaDataGUI::$object
protected

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

Referenced by __construct().

◆ $record_filter

array ilObjectMetaDataGUI::$record_filter = null
protected

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

◆ $record_gui

ilAdvancedMDRecordGUI ilObjectMetaDataGUI::$record_gui = null
protected

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

◆ $ref_id

int ilObjectMetaDataGUI::$ref_id = 0
protected

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

Referenced by getAdvMdRecordObject().

◆ $retriever

ilObjectRequestRetriever ilObjectMetaDataGUI::$retriever
private

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

◆ $sub_id

int ilObjectMetaDataGUI::$sub_id
protected

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

Referenced by __construct().

◆ $sub_type

ilObjectMetaDataGUI::$sub_type
protected

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

Referenced by __construct(), getAdvMdRecordObject(), and getLOMType().

◆ $tabs

ilTabsGUI ilObjectMetaDataGUI::$tabs
protected

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

◆ $tax_md_gui

ilTaxMDGUI ilObjectMetaDataGUI::$tax_md_gui = null
protected

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

◆ $tax_obj_gui

ilObjTaxonomyGUI ilObjectMetaDataGUI::$tax_obj_gui = null
protected

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

Referenced by getTaxonomyObjGUI().

◆ $taxonomy_settings_form_manipulator

Closure ilObjectMetaDataGUI::$taxonomy_settings_form_manipulator = null
protected

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

◆ $taxonomy_settings_form_saver

Closure ilObjectMetaDataGUI::$taxonomy_settings_form_saver = null
protected

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

◆ $tpl

ilGlobalTemplateInterface ilObjectMetaDataGUI::$tpl
protected

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


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