3 declare(strict_types=1);
27 public const TYPE =
'etal';
52 public function __construct(
int $a_id = 0,
bool $a_call_by_reference =
true)
74 public function read(): void
80 public function create():
int 84 $this->data->setObjectId($this->
getId());
89 $app->setSubtitle(
'');
90 $app->setFullday($this->data->isAllDay());
93 $app->setStart($this->data->getStartDate());
94 $app->setEnd($this->data->getEndDate());
95 $app->setLocation($this->data->getLocation());
104 'Modules/EmployeeTalk',
107 'obj_id' => $this->
getId(),
108 'appointments' => $apps
112 return $this->
getId();
117 public function update():
bool 125 $app->setFullday($this->data->isAllDay());
128 $app->setStart($this->data->getStartDate());
129 $app->setEnd($this->data->getEndDate());
130 $app->setLocation($this->data->getLocation());
139 'Modules/EmployeeTalk',
142 'obj_id' => $this->
getId(),
143 'appointments' => $apps
155 self::loadRootOrgRefIdAndId();
157 return self::$root_ref_id;
165 self::loadRootOrgRefIdAndId();
167 return self::$root_id;
172 if (self::$root_ref_id === -1 || self::$root_id === -1) {
174 $ilDB = $DIC[
'ilDB'];
175 $q =
"SELECT o.obj_id, r.ref_id FROM object_data o 176 INNER JOIN object_reference r ON r.obj_id = o.obj_id 177 WHERE title = " .
$ilDB->quote(
'__TalkTemplateAdministration',
'text') .
"";
180 self::$root_id = (
int)
$res[
"obj_id"];
181 self::$root_ref_id = (
int)
$res[
"ref_id"];
196 public static function _exists(
int $a_id,
bool $a_reference =
false, ?
string $type = null): bool
198 return parent::_exists($a_id, $a_reference,
"etal");
206 public function delete():
bool 214 'Modules/EmployeeTalk',
218 'obj_id' => $this->
getId(),
227 $result = parent::delete();
229 if (!$parent_series->hasChildren()) {
230 $parent_series->delete();
250 $this->data = clone
$data;
254 public function cloneObject(
int $target_id,
int $copy_id = 0,
bool $omit_tree =
false):
ilObjEmployeeTalk 259 $talkClone = parent::cloneObject($target_id, $copy_id, $omit_tree);
260 $data = $this->
getData()->setObjectId($talkClone->getId());
262 $talkClone->setData(
$data);
__construct(int $a_id=0, bool $a_call_by_reference=true)
Apointment templates are used for automatic generated apointments.
create()
note: title, description and type should be set when this function is called
setData(EmployeeTalk $data)
static loadRootOrgRefIdAndId()
getLongDescription()
get object long description (stored in object_description)
static _exists(int $a_id, bool $a_reference=false, ?string $type=null)