ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilDclEditViewDefinition.php
Go to the documentation of this file.
1 <?php
2 
20 {
21  public const PARENT_TYPE = 'dclf';
22  protected int $table_id;
23 
28  public function getParentType(): string
29  {
30  return self::PARENT_TYPE;
31  }
32 
38  public function getAvailablePlaceholders(): array
39  {
40  $all = array();
41 
42  $tableview = new ilDclTableView($this->getId());
43  $table_id = $tableview->getTableId();
44  $objTable = ilDclCache::getTableCache($table_id);
45  $fields = $objTable->getRecordFields();
46  $standardFields = $objTable->getStandardFields();
47 
48  foreach ($fields as $field) {
49  $all[] = "[" . $field->getTitle() . "]";
50 
51  if ($field->getDatatypeId() == ilDclDatatype::INPUTFORMAT_REFERENCE) {
52  $all[] = '[dclrefln field="' . $field->getTitle() . '"][/dclrefln]';
53  }
54  }
55 
56  foreach ($standardFields as $field) {
57  $all[] = "[" . $field->getId() . "]";
58  }
59 
60  return $all;
61  }
62 
63  public static function exists(int $id): bool
64  {
65  return parent::_exists(self::PARENT_TYPE, $id);
66  }
67 
68  public static function isActive(int $id): bool
69  {
70  return parent::_lookupActive($id, self::PARENT_TYPE);
71  }
72 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTableCache(int $table_id=null)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAvailablePlaceholders()
Get all placeholders for table id.