ILIAS  release_8 Revision v8.24
class.ilObjTalkTemplateAdministration.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22{
23 public const 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
39
40 public function read(): void
41 {
42 parent::read();
43 }
44
45
46 public function create(): int
47 {
48 return parent::create();
49 }
50
51
52 public function update(): bool
53 {
54 return parent::update();
55 }
56
57
61 public static function getRootRefId(): int
62 {
64
65 return self::$root_ref_id;
66 }
67
68
72 public static function getRootObjId(): int
73 {
75
76 return self::$root_id;
77 }
78
79
80 private static function loadRootOrgRefIdAndId(): void
81 {
82 if (self::$root_ref_id === -1 || self::$root_id === -1) {
83 global $DIC;
84 $ilDB = $DIC['ilDB'];
85 $q = "SELECT o.obj_id, r.ref_id FROM object_data o
86 INNER JOIN object_reference r ON r.obj_id = o.obj_id
87 WHERE title = '__TalkTemplateAdministration'
88 LIMIT 1";
89 $set = $ilDB->query($q);
90 $res = $ilDB->fetchAssoc($set);
91 self::$root_id = (int) $res["obj_id"];
92 self::$root_ref_id = (int) $res["ref_id"];
93 }
94 }
95
96 public function getTitle(): string
97 {
98 if (parent::getTitle() !== "__TalkTemplateAdministration") {
99 return parent::getTitle();
100 } else {
101 return $this->lng->txt("objs_tala");
102 }
103 }
104
111 public static function _exists(int $a_id, bool $a_reference = false, ?string $type = null): bool
112 {
113 return parent::_exists($a_id, $a_reference, "tala");
114 }
115
122 public function delete(): bool
123 {
124 return parent::delete();
125 }
126}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(int $a_id, bool $a_reference=false, ?string $type=null)
create()
note: title, description and type should be set when this function is called
__construct(int $a_id=0, bool $a_call_by_reference=true)
string $type
global $DIC
Definition: feed.php:28
$res
Definition: ltiservices.php:69
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc