ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilDclDetailedViewDefinition.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  public const PARENT_TYPE = 'dclf';
24  protected int $table_id;
25 
29  public function getParentType(): string
30  {
31  return self::PARENT_TYPE;
32  }
33 
37  public function getAvailablePlaceholders(): array
38  {
39  $tableview = new ilDclTableView($this->getId());
40  return ilDclCache::getTableCache($tableview->getTableId())->getFields();
41  }
42 
43  public static function exists(int $id): bool
44  {
45  return parent::_exists(self::PARENT_TYPE, $id);
46  }
47 
48  public function isActive(): bool
49  {
50  foreach ($this->getAllPCIds() as $id) {
51  if ($this->getContentObjectForPcId($id)->isEnabled()) {
52  return parent::_lookupActive($this->getId(), self::PARENT_TYPE);
53  }
54  }
55  return false;
56  }
57 }
getAllPCIds()
Get all pc ids.
getContentObjectForPcId(string $pcid)
Get content object for pc id.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
static getTableCache(?int $table_id=null)