ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjTalkTemplateAdministration.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public const string TABLE_NAME = 'etal_data';
24
25 private static int $root_ref_id = -1;
26 protected static int $root_id = -1;
27
28
33 public function __construct(int $a_id = 0, bool $a_call_by_reference = true)
34 {
35 $this->type = "tala";
36 parent::__construct($a_id, $a_call_by_reference);
37 }
38
42 public static function getRootRefId(): int
43 {
45
46 return self::$root_ref_id;
47 }
48
49
53 public static function getRootObjId(): int
54 {
56
57 return self::$root_id;
58 }
59
60
61 private static function loadRootOrgRefIdAndId(): void
62 {
63 if (self::$root_ref_id === -1 || self::$root_id === -1) {
64 global $DIC;
65 $ilDB = $DIC['ilDB'];
66 $q = "SELECT o.obj_id, r.ref_id FROM object_data o
67 INNER JOIN object_reference r ON r.obj_id = o.obj_id
68 WHERE title = '__TalkTemplateAdministration'
69 LIMIT 1";
70 $set = $ilDB->query($q);
71 $res = $ilDB->fetchAssoc($set);
72 self::$root_id = (int) $res["obj_id"];
73 self::$root_ref_id = (int) $res["ref_id"];
74 }
75 }
76
77 public function getTitle(): string
78 {
79 if (parent::getTitle() !== "__TalkTemplateAdministration") {
80 return parent::getTitle();
81 } else {
82 return $this->lng->txt("objs_tala");
83 }
84 }
85
86 public static function _exists(int $id, bool $reference = false, ?string $type = null): bool
87 {
88 return parent::_exists($id, $reference, "tala");
89 }
90
97 public function delete(): bool
98 {
99 return parent::delete();
100 }
101}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Class ilContainer.
__construct(int $a_id=0, bool $a_call_by_reference=true)
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
string $type
$res
Definition: ltiservices.php:69
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26
$q
Definition: shib_logout.php:23