ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilDclCreateViewDefinition.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
13 {
14  const PARENT_TYPE = 'dclf';
18  protected $active = false;
22  protected $table_id;
26  protected static $record_view_cache = array();
27 
28 
34  public function getParentType()
35  {
36  return self::PARENT_TYPE;
37  }
38 
39 
48  public function getAvailablePlaceholders()
49  {
50  $all = array();
51 
52  $tableview = new ilDclTableView($this->getId());
53  $table_id = $tableview->getTableId();
55  $fields = $objTable->getRecordFields();
56  $standardFields = $objTable->getStandardFields();
57 
58  foreach ($fields as $field) {
59  $all[] = "[" . $field->getTitle() . "]";
60 
61  if ($field->getDatatypeId() == ilDclDatatype::INPUTFORMAT_REFERENCE) {
62  $all[] = '[dclrefln field="' . $field->getTitle() . '"][/dclrefln]';
63  }
64  // SW 14.10.2015 http://www.ilias.de/mantis/view.php?id=16874
65  // if ($field->getDatatypeId() == ilDclDatatype::INPUTFORMAT_ILIAS_REF) {
66  // $all[] = '[dcliln field="' . $field->getTitle() . '"][/dcliln]';
67  // }
68  }
69 
70  foreach ($standardFields as $field) {
71  $all[] = "[" . $field->getId() . "]";
72  }
73 
74  return $all;
75  }
76 
77 
78  public static function exists($id)
79  {
80  return parent::_exists(self::PARENT_TYPE, $id);
81  }
82 
83 
84  public static function isActive($id)
85  {
86  return parent::_lookupActive($id, self::PARENT_TYPE);
87  }
88 }
getAvailablePlaceholders()
Get all placeholders for table id.
static getTableCache($table_id=0)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
Class ilDclTableView.
Class ilDclCreateViewDefinition.