20 declare(strict_types=1);
33 $this->type = $this::TYPE;
39 if (
$data = $this->db->fetchObject($stmt)) {
48 protected function doCreate(
bool $clone_mode =
false): void
52 $main_table->setObjId($this->
getId());
53 $main_table->setTitle($this->
getTitle());
54 $main_table->setAddPerm(
true);
55 $main_table->setEditPerm(
true);
56 $main_table->setDeletePerm(
false);
57 $main_table->setDeleteByOwner(
true);
58 $main_table->setEditByOwner(
true);
59 $main_table->setLimited(
false);
60 $main_table->setIsVisible(
true);
61 $main_table->doCreate();
80 $table->doDelete(
false,
true);
120 $mail->setType($action);
121 $mail->setActor($this->
user->getId());
122 $mail->setObjId($this->
getId());
124 $mail->setRecord($record);
129 $user_id !== $this->
user->getId() &&
130 $record->
getTable()->hasPermissionToViewRecord($this->
getRefId(), $record, $user_id) &&
131 [] !== $record->
getTable()->getVisibleTableViews($user_id)
133 $mail->addRecipient($user_id);
147 $new_obj->cloneStructure($this->
getRefId());
157 $this->
setRating($original->getRating());
161 foreach ($original->getTables() as $table) {
163 $new_table->setObjId($this->
getId());
164 $new_table->cloneStructure($table);
168 $table->afterClone();
174 $this->is_online = $a_val;
184 $this->rating = $a_val;
194 $this->public_notes = $a_val;
204 $this->approval = $a_val;
227 $stmt = $this->db->queryF(
228 'SELECT id FROM il_dcl_table WHERE obj_id = %s ORDER BY table_order',
233 while ($rec = $this->db->fetchAssoc($stmt)) {
251 if ($table->getIsVisible() && $table->getVisibleTableViews()) {
252 $tables[$table->getId()] = $table;
const TYPE_DATACOLLECTION
sendRecordNotification(int $action, ilDclBaseRecordModel $record)
setNotification(bool $a_val)
cloneMetaData(ilObject $target_obj)
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object.
notification()
description: > Example for rendring a notification glyph.
const TYPE_DATA_COLLECTION
static getTableCache(int $table_id=null)
static setCloneOf(int $old, int $new, string $type)
static updateNotificationTime(int $type, int $id, array $user_ids, ?int $page_id=null, bool $activate_new_entries=true)
Update the last mail timestamp for given object and users.
setPublicNotes(bool $a_val)
doCreate(bool $clone_mode=false)
static _getInstance(int $a_copy_id)
getTableById(int $table_id)
cloneStructure(int $original_id)