19 declare(strict_types=1);
32 $this->type = $this::TYPE;
38 if (
$data = $this->db->fetchObject($stmt)) {
47 protected function doCreate(
bool $clone_mode =
false): void
51 $main_table->setObjId($this->
getId());
52 $main_table->setTitle($this->
getTitle());
53 $main_table->setAddPerm(
true);
54 $main_table->setEditPerm(
true);
55 $main_table->setDeletePerm(
false);
56 $main_table->setDeleteByOwner(
true);
57 $main_table->setEditByOwner(
true);
58 $main_table->setLimited(
false);
59 $main_table->setIsVisible(
true);
60 $main_table->doCreate();
79 $table->doDelete(
false,
true);
119 $mail->setType($action);
120 $mail->setActor($this->
user->getId());
121 $mail->setObjId($this->
getId());
123 $mail->setRecord($record);
128 $user_id !== $this->
user->getId() &&
129 $record->
getTable()->hasPermissionToViewRecord($this->
getRefId(), $record, $user_id) &&
130 [] !== $record->
getTable()->getVisibleTableViews($user_id)
132 $mail->addRecipient($user_id);
146 $new_obj->cloneStructure($this->
getRefId());
156 $this->
setRating($original->getRating());
160 foreach ($original->getTables() as $table) {
162 $new_table->setObjId($this->
getId());
163 $new_table->cloneStructure($table);
167 $table->afterClone();
173 $this->is_online = $a_val;
183 $this->rating = $a_val;
193 $this->public_notes = $a_val;
203 $this->approval = $a_val;
226 $stmt = $this->db->queryF(
227 'SELECT id FROM il_dcl_table WHERE obj_id = %s ORDER BY table_order',
232 while ($rec = $this->db->fetchAssoc($stmt)) {
250 if ($table->getIsVisible() && $table->getVisibleTableViews()) {
251 $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
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)