ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

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

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  }
global $DIC
Definition: saml.php:7
withReferences()
determines wehter objects are referenced or not (got ref ids or not)
getId()
get object id public
Taxonomies selection for metadata helper GUI.
getSelectableTaxonomies()
Get selectable taxonomies for current object.
getType()
get object type public
getRefId()
get reference id public
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ 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.

Referenced by ilSCORM2004ScoGUI\executeCommand(), ilSCORM2004ChapterGUI\executeCommand(), ilStructureObjectGUI\executeCommand(), and ilObjMediaObjectGUI\executeCommand().

237  {
238  $this->md_observers[] = array(
239  "class" => $a_class,
240  "method" => $a_method,
241  "section" => $a_section
242  );
243  }
+ Here is the caller graph for this function:

◆ canEdit()

ilObjectMetaDataGUI::canEdit ( )
protected

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

References hasActiveRecords().

Referenced by getTab(), and setSubTabs().

360  {
361  // if($this->hasActiveRecords() &&
362  // $this->obj_id)
363  // {
364  if ($this->hasActiveRecords()) {
365  if ($this->sub_type == "-" ||
366  $this->sub_id) {
367  return true;
368  }
369  }
370  return false;
371  }
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:

◆ edit()

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

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

References $tpl, and initEditForm().

Referenced by update().

505  {
506  $tpl = $this->tpl;
507 
508  if (!$a_form) {
509  $a_form = $this->initEditForm();
510  }
511 
512  $tpl->setContent($a_form->getHTML());
513  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editTaxonomySettings()

ilObjectMetaDataGUI::editTaxonomySettings ( )
protected

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

References $form, and initTaxonomySettingsForm().

623  {
624  $this->tabs->activateSubTab("tax_settings");
625 
626  $form = $this->initTaxonomySettingsForm();
627  $this->tpl->setContent($form->getHTML());
628  }
if(isset($_POST['submit'])) $form
initTaxonomySettingsForm()
Init taxonomy settings form.
+ Here is the call graph for this function:

◆ enableTaxonomyDefinition()

ilObjectMetaDataGUI::enableTaxonomyDefinition (   $a_enable)

Enable taxonomy definition.

Parameters

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.

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

132  {
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  }
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ getAdvMdRecordObject()

ilObjectMetaDataGUI::getAdvMdRecordObject ( )

◆ getBlockHTML()

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

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

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

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

◆ getKeyValueList()

ilObjectMetaDataGUI::getKeyValueList ( )

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

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

577  {
578  $html = "";
579  $sep = "";
580 
583 
584  include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php";
585  include_once "Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php";
588  $vals = new ilAdvancedMDValues($record->getRecordId(), $this->obj_id, $this->sub_type, $this->sub_id);
589 
590 
591  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
592  include_once('Services/ADT/classes/class.ilADTFactory.php');
593 
594  // this correctly binds group and definitions
595  $vals->read();
596 
597  $defs = $vals->getDefinitions();
598  foreach ($vals->getADTGroup()->getElements() as $element_id => $element) {
599  if ($element instanceof ilADTLocation) {
600  continue;
601  }
602 
603  $html .= $sep . $defs[$element_id]->getTitle() . ": ";
604 
605  if ($element->isNull()) {
606  $value = "-";
607  } else {
608  $value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
609 
610  $value = $value->getHTML();
611  }
612  $html .= $value;
613  $sep = ",    ";
614  }
615  }
616 
618 
619  return $html;
620  }
getAdvMdRecordObject()
Get adv md record type.
static setUseRelativeDates($a_status)
set use relative dates
static getInstance()
Get singleton.
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
static useRelativeDates()
check if relative dates are used
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ getLOMType()

ilObjectMetaDataGUI::getLOMType ( )
protected

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

References $obj_type, and $sub_type.

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

246  {
247  if ($this->sub_type != "-" &&
248  $this->sub_id) {
249  return $this->sub_type;
250  } else {
251  return $this->obj_type;
252  }
253  }
+ 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 379 of file class.ilObjectMetaDataGUI.php.

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

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

380  {
382 
383  if (!$a_base_class) {
384  $path = array();
385  } else {
386  $path = array($a_base_class);
387  }
388  $path[] = "ilobjectmetadatagui";
389 
390  $link = null;
391  if ($this->isLOMAvailable()) {
392  $path[] = "ilmdeditorgui";
393  $link = $ilCtrl->getLinkTargetByClass($path, "listSection");
394  } elseif ($this->isAdvMDAvailable()) {
395  if ($this->canEdit()) {
396  $link = $ilCtrl->getLinkTarget($this, "edit");
397  } elseif ($this->hasAdvancedMDSettings()) {
398  $path[] = "iladvancedmdsettingsgui";
399  $link = $ilCtrl->getLinkTargetByClass($path, "showRecords");
400  }
401  }
402  if ($link == null && is_object($this->tax_obj_gui)) { // taxonomy definition available?
403  $path[] = "ilobjtaxonomygui";
404  $link = $ilCtrl->getLinkTargetByClass($path, "");
405  }
406  return $link;
407  }
$path
Definition: aliased.php:25
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller 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.

231  {
232  return $this->tax_obj_gui;
233  }

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

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

Referenced by canEdit().

346  {
347  include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
348 
350 
351  return
353  $adv_type,
354  $adv_ref_id,
356  ));
357  }
getAdvMdRecordObject()
Get adv md record type.
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAdvancedMDSettings()

ilObjectMetaDataGUI::hasAdvancedMDSettings ( )
protected

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

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

Referenced by getTab(), and setSubTabs().

326  {
327  if ($this->sub_id) {
328  return false;
329  }
330 
331  include_once 'Services/Container/classes/class.ilContainer.php';
332  include_once 'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
333 
335  $this->obj_id,
337  false
338  );
339  }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilObjectMetaDataGUI::initEditForm ( )
protected

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

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

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

474  {
476  $lng = $this->lng;
477 
478  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
479  $form = new ilPropertyFormGUI();
480  $form->setFormAction($ilCtrl->getFormAction($this, "update"));
481  $form->setTitle($lng->txt("meta_tab_advmd"));
482 
483  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
484  $this->record_gui = new ilAdvancedMDRecordGUI(
486  $this->obj_type,
487  $this->obj_id,
488  $this->sub_type,
489  $this->sub_id
490  );
491 
492  if ($this->adv_type != "") {
493  $this->record_gui->setAdvMdRecordObject($this->adv_ref_id, $this->adv_type, $this->adv_subtype);
494  }
495 
496  $this->record_gui->setPropertyForm($form);
497  $this->record_gui->parse();
498 
499  $form->addCommandButton("update", $lng->txt("save"));
500 
501  return $form;
502  }
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
+ Here is the caller graph for this function:

◆ initTaxonomySettingsForm()

ilObjectMetaDataGUI::initTaxonomySettingsForm ( )
protected

Init taxonomy settings form.

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

References $form.

Referenced by editTaxonomySettings(), and saveTaxonomySettings().

634  {
635  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
636  $form = new ilPropertyFormGUI();
637  $form->setFormAction($this->ctrl->getFormAction($this), "saveTaxonomySettings");
638  $form->setTitle($this->lng->txt("tax_tax_settings"));
639  $this->taxonomy_settings_form_manipulator->bindTo($this);
640  call_user_func_array($this->taxonomy_settings_form_manipulator, [$form]);
641  $form->addCommandButton("saveTaxonomySettings", $this->lng->txt("save"));
642 
643  return $form;
644  }
This class represents a property form user interface.
if(isset($_POST['submit'])) $form
+ Here is the caller graph for this function:

◆ isAdvMDAvailable()

ilObjectMetaDataGUI::isAdvMDAvailable ( )
protected

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

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

Referenced by getTab(), and setSubTabs().

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  }
getAdvMdRecordObject()
Get adv md record type.
static _getAssignableObjectTypes($a_include_text=false)
Get assignable object type.
+ 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.

References $type, and getLOMType().

Referenced by getTab(), and setSubTabs().

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  )));
323  }
$type
+ 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 649 of file class.ilObjectMetaDataGUI.php.

References $form, and initTaxonomySettingsForm().

650  {
651  $form = $this->initTaxonomySettingsForm();
652  if ($form->checkInput()) {
653  $this->taxonomy_settings_form_saver->bindTo($this);
654  call_user_func_array($this->taxonomy_settings_form_saver, [$form]);
655  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
656  $this->ctrl->redirect($this, "editTaxonomySettings");
657  } else {
658  $form->setValuesByPost();
659  $this->tpl->setContent($form->getHtml());
660  }
661  }
if(isset($_POST['submit'])) $form
initTaxonomySettingsForm()
Init taxonomy settings form.
+ 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 409 of file class.ilObjectMetaDataGUI.php.

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

Referenced by executeCommand().

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

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

516  {
517  $lng = $this->lng;
519 
520  $form = $this->initEditForm();
521  if (
522  $form->checkInput() &&
523  $this->record_gui->importEditFormPostValues()) {
524  $this->record_gui->writeEditForm();
525 
526  // Update ECS content
527  if ($this->obj_type == "crs") {
528  include_once "Modules/Course/classes/class.ilECSCourseSettings.php";
529  $ecs = new ilECSCourseSettings($this->object);
530  $ecs->handleContentUpdate();
531  }
532 
533  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
534  $ilCtrl->redirect($this, "edit");
535  }
536 
537  $form->setValuesByPost();
538  $this->edit($form);
539  }
edit(ilPropertyFormGUI $a_form=null)
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
Class ilECSCourseSettings.
+ 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.

Referenced by getBlockHTML(), and getKeyValueList().

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

◆ $sub_id

ilObjectMetaDataGUI::$sub_id
protected

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

Referenced by getBlockHTML(), and getKeyValueList().

◆ $sub_type

ilObjectMetaDataGUI::$sub_type
protected

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