ILIAS  release_8 Revision v8.23
ilObjectMetaDataGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjectMetaDataGUI

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

ilObjectMetaDataGUI: ilMDEditorGUI, ilAdvancedMDSettingsGUI, ilPropertyFormGUI, ilTaxMDGUI, ilObjTaxonomyGUI

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

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.

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

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  $md_obj = new ilMD($this->obj_id, (int) $this->sub_id, $this->getLOMType());
115 
116  if (!$this->in_workspace && $in_repository) {
117  // (parent) container taxonomies?
118  $this->tax_md_gui = new ilTaxMDGUI(
119  $md_obj->getRBACId(),
120  $md_obj->getObjId(),
121  $md_obj->getObjType(),
123  );
124  $tax_ids = $this->tax_md_gui->getSelectableTaxonomies();
125  if (!is_array($tax_ids) || count($tax_ids) == 0) {
126  $this->tax_md_gui = null;
127  }
128  }
129  }
130 
131  $this->lng->loadLanguageModule("meta");
132  $this->lng->loadLanguageModule("tax");
133  }
withReferences()
determines whether objects are referenced or not (got ref ids or not)
global $DIC
Definition: feed.php:28
Taxonomies selection for metadata helper GUI.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Base class for all sub item list gui's.
+ Here is the call graph for this function:

Member Function Documentation

◆ addMDObserver()

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

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

Referenced by ilStructureObjectGUI\executeCommand(), and ilObjMediaObjectGUI\returnToContextObject().

229  : void
230  {
231  $this->md_observers[] = [
232  "class" => $class,
233  "method" => $method,
234  "section" => $section
235  ];
236  }
+ Here is the caller graph for this function:

◆ canEdit()

ilObjectMetaDataGUI::canEdit ( )
protected

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

References hasActiveRecords().

Referenced by getTab(), and setSubTabs().

354  : bool
355  {
356  if (is_array($this->sub_type)) { // only settings
357  return false;
358  }
359 
360  if ($this->hasActiveRecords()) {
361  if ($this->sub_type == "-" || $this->sub_id) {
362  return true;
363  }
364  }
365  return false;
366  }
hasActiveRecords()
check if active records exist in current path anf for object type
+ 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 510 of file class.ilObjectMetaDataGUI.php.

Referenced by getBlockHTML().

510  : bool
511  {
512  return !(is_array($this->record_filter) && !in_array($record_id, $this->record_filter));
513  }
+ Here is the caller graph for this function:

◆ edit()

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

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

References initEditForm().

Referenced by update().

481  : void
482  {
483  if (!$a_form) {
484  $a_form = $this->initEditForm();
485  }
486 
487  $this->tpl->setContent($a_form->getHTML());
488  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editTaxonomySettings()

ilObjectMetaDataGUI::editTaxonomySettings ( )
protected

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

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

601  : void
602  {
603  $this->tabs->activateSubTab("tax_settings");
604  $form = $this->initTaxonomySettingsForm();
605  $this->tpl->setContent($form->getHTML());
606  }
+ Here is the call graph for this function:

◆ enableTaxonomyDefinition()

ilObjectMetaDataGUI::enableTaxonomyDefinition ( bool  $enable)

Enable taxonomy definition.

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

References ILIAS\Repository\object().

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

◆ executeCommand()

ilObjectMetaDataGUI::executeCommand ( )

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

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

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

◆ getAdvMdRecordObject()

ilObjectMetaDataGUI::getAdvMdRecordObject ( )

Get adv md record type.

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

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

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

260  : array
261  {
262  if ($this->adv_type == null) {
263  if ($this->in_repository) {
265  } else {
267  }
268  }
270  }
+ 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 523 of file class.ilObjectMetaDataGUI.php.

References $obj_id, $sub_type, $url, ilAdvancedMDRecord\_getSelectedRecordsByObject(), checkFilter(), getAdvMdRecordObject(), ILIAS\Repository\int(), and ILIAS\Repository\lng().

523  : string
524  {
525  $html = "";
526 
529  $adv_type,
530  $adv_id,
531  $adv_subtype,
532  $this->in_repository
533  );
534  foreach ($advanced_md_records as $record) {
535  if (!$this->checkFilter($record->getRecordId())) {
536  continue;
537  }
538  $block = new ilObjectMetaDataBlockGUI($record, $callback);
539  $block->setValues(new ilAdvancedMDValues(
540  $record->getRecordId(),
543  (int) $this->sub_id
544  ));
545  if ($commands) {
546  foreach ($commands as $caption => $url) {
547  $block->addBlockCommand($url, $this->lng->txt($caption));
548  }
549  }
550  $html .= $block->getHTML();
551  }
552 
553  return $html;
554  }
getAdvMdRecordObject()
Get adv md record type.
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
$url
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getKeyValueList()

ilObjectMetaDataGUI::getKeyValueList ( )

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

References $obj_id, $sub_type, ilAdvancedMDRecord\_getSelectedRecordsByObject(), getAdvMdRecordObject(), ilADTFactory\getInstance(), ILIAS\Repository\int(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

556  : string
557  {
558  $html = "";
559  $sep = "";
560 
563 
566  $adv_type,
567  $adv_id,
568  $adv_subtype,
569  $this->in_repository
570  );
571  foreach ($advanced_md_records as $record) {
572  $vals = new ilAdvancedMDValues($record->getRecordId(), $this->obj_id, $this->sub_type, (int) $this->sub_id);
573 
574  // this correctly binds group and definitions
575  $vals->read();
576 
577  $defs = $vals->getDefinitions();
578  foreach ($vals->getADTGroup()->getElements() as $element_id => $element) {
579  if ($element instanceof ilADTLocation) {
580  continue;
581  }
582 
583  $html .= $sep . $defs[$element_id]->getTitle() . ": ";
584 
585  if ($element->isNull()) {
586  $value = "-";
587  } else {
588  $value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
589 
590  $value = $value->getHTML();
591  }
592  $html .= $value;
593  $sep = ",    ";
594  }
595  }
596 
598  return $html;
599  }
getAdvMdRecordObject()
Get adv md record type.
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
static setUseRelativeDates(bool $a_status)
set use relative dates
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getLOMType()

ilObjectMetaDataGUI::getLOMType ( )
protected

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

References $obj_type, and $sub_type.

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

238  : string
239  {
240  if ($this->sub_type != "-" && $this->sub_id) {
241  return $this->sub_type;
242  }
243  return $this->obj_type;
244  }
+ Here is the caller graph for this function:

◆ getTab()

ilObjectMetaDataGUI::getTab ( string  $base_class = null)

Get tab link if available.

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

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

Referenced by ilGlossaryTermGUI\getTabs(), ilObjMediaObjectGUI\getTabs(), and ilStructureObjectGUI\setTabs().

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

◆ getTaxonomyObjGUI()

ilObjectMetaDataGUI::getTaxonomyObjGUI ( )

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

References $tax_obj_gui.

225  {
226  return $this->tax_obj_gui;
227  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ hasActiveRecords()

ilObjectMetaDataGUI::hasActiveRecords ( )
protected

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

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

References ilAdvancedMDRecord\_getSelectedRecordsByObject(), and getAdvMdRecordObject().

Referenced by canEdit().

342  : bool
343  {
345 
347  $adv_type,
348  $adv_id,
349  $adv_subtype,
350  $this->in_repository
351  ));
352  }
getAdvMdRecordObject()
Get adv md record type.
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAdvancedMDSettings()

ilObjectMetaDataGUI::hasAdvancedMDSettings ( )
protected

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

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

Referenced by getTab(), and setSubTabs().

327  : bool
328  {
329  if ($this->sub_id) {
330  return false;
331  }
332 
334  $this->obj_id,
336  );
337  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilObjectMetaDataGUI::initEditForm ( )
protected

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

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

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

455  {
456  $form = new ilPropertyFormGUI();
457  $form->setFormAction($this->ctrl->getFormAction($this, "update"));
458  $form->setTitle($this->lng->txt("meta_tab_advmd"));
459 
460  $this->record_gui = new ilAdvancedMDRecordGUI(
462  $this->obj_type,
463  $this->obj_id,
464  $this->sub_type,
465  (int) $this->sub_id,
466  $this->in_repository
467  );
468 
469  if ($this->adv_type != "") {
470  $this->record_gui->setAdvMdRecordObject($this->adv_id, $this->adv_type, $this->adv_subtype);
471  }
472 
473  $this->record_gui->setPropertyForm($form);
474  $this->record_gui->parse();
475 
476  $form->addCommandButton("update", $this->lng->txt("save"));
477 
478  return $form;
479  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTaxonomySettingsForm()

ilObjectMetaDataGUI::initTaxonomySettingsForm ( )
protected

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

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

Referenced by editTaxonomySettings(), and saveTaxonomySettings().

609  {
610  $form = new ilPropertyFormGUI();
611  $form->setFormAction($this->ctrl->getFormAction($this));
612  $form->setTitle($this->lng->txt("tax_tax_settings"));
613  $this->taxonomy_settings_form_manipulator->bindTo($this);
614  call_user_func_array($this->taxonomy_settings_form_manipulator, [$form]);
615  $form->addCommandButton("saveTaxonomySettings", $this->lng->txt("save"));
616 
617  return $form;
618  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAdvMDAvailable()

ilObjectMetaDataGUI::isAdvMDAvailable ( )
protected

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

References ilAdvancedMDRecord\_getAssignableObjectTypes(), and getAdvMdRecordObject().

Referenced by getTab(), and setSubTabs().

272  : bool
273  {
274  foreach (ilAdvancedMDRecord::_getAssignableObjectTypes() as $item) {
275  list(, $adv_type, $adv_subtype) = $this->getAdvMdRecordObject();
276 
277  if ($item["obj_type"] == $adv_type) {
278  if ((!$item["sub_type"] && $adv_subtype == "-") ||
279  ($item["sub_type"] == $adv_subtype) ||
280  (is_array($adv_subtype) && in_array($item["sub_type"], $adv_subtype))
281  ) {
282  return true;
283  }
284  }
285  }
286  return false;
287  }
getAdvMdRecordObject()
Get adv md record type.
static _getAssignableObjectTypes(bool $a_include_text=false)
Get assignable object type public.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLOMAvailable()

ilObjectMetaDataGUI::isLOMAvailable ( )
protected

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

References $type, and getLOMType().

Referenced by getTab(), and setSubTabs().

289  : bool
290  {
291  $type = $this->getLOMType();
292  if ($type == $this->sub_type) {
293  $type = $this->obj_type . ":" . $type;
294  }
295 
296  return (
297  ($this->obj_id || !$this->obj_type) &&
298  in_array($type, [
299  "crs",
300  'grp',
301  "file",
302  "glo",
303  "glo:gdf",
304  "svy",
305  "spl",
306  "tst",
307  "qpl",
308  ":mob",
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:mpg'
323  ])
324  );
325  }
$type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTaxonomySettings()

ilObjectMetaDataGUI::saveTaxonomySettings ( )
protected

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

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

620  : void
621  {
622  $form = $this->initTaxonomySettingsForm();
623  if ($form->checkInput()) {
624  $this->taxonomy_settings_form_saver->bindTo($this);
625  call_user_func_array($this->taxonomy_settings_form_saver, [$form]);
626  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
627  $this->ctrl->redirect($this, "editTaxonomySettings");
628  } else {
629  $form->setValuesByPost();
630  $this->tpl->setContent($form->getHTML());
631  }
632  }
+ 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 250 of file class.ilObjectMetaDataGUI.php.

References $adv_id, $adv_subtype, and $adv_type.

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

◆ setRecordFilter()

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

Set advanced record filter.

Parameters
?int[]$filter

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

206  : void
207  {
208  $this->record_filter = $filter;
209  }

◆ setSubTabs()

ilObjectMetaDataGUI::setSubTabs ( string  $active)

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

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

Referenced by executeCommand().

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

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

◆ update()

ilObjectMetaDataGUI::update ( )
protected

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

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

490  : void
491  {
492  $form = $this->initEditForm();
493  if ($form->checkInput() && $this->record_gui->importEditFormPostValues()) {
494  $this->record_gui->writeEditForm();
495 
496  // Update ECS content
497  if ($this->obj_type == "crs") {
498  $ecs = new ilECSCourseSettings($this->object);
499  $ecs->handleContentUpdate();
500  }
501 
502  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
503  $this->ctrl->redirect($this, "edit");
504  }
505 
506  $form->setValuesByPost();
507  $this->edit($form);
508  }
edit(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $adv_id

int ilObjectMetaDataGUI::$adv_id = null
protected

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

Referenced by getAdvMdRecordObject(), and setAdvMdRecordObject().

◆ $adv_subtype

string ilObjectMetaDataGUI::$adv_subtype = null
protected

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

Referenced by getAdvMdRecordObject(), and setAdvMdRecordObject().

◆ $adv_type

string ilObjectMetaDataGUI::$adv_type = null
protected

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

Referenced by getAdvMdRecordObject(), and setAdvMdRecordObject().

◆ $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

◆ $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 __construct(), and 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

◆ $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: