ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclDetailedViewDefinition.php
Go to the documentation of this file.
1<?php
2
19declare(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}
static getTableCache(?int $table_id=null)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
getContentObjectForPcId(string $pcid)
Get content object for pc id.
getAllPCIds()
Get all pc ids.