19declare(strict_types=1);
31 public function __construct(
int $a_id = 0,
bool $a_reference =
true)
39 $this->type = $this::TYPE;
45 if (
$data = $this->db->fetchObject($stmt)) {
54 protected function doCreate(
bool $clone_mode =
false): void
58 $main_table->setObjId($this->
getId());
59 $main_table->setTitle($this->
getTitle());
60 $main_table->setAddPerm(
true);
61 $main_table->setEditPerm(
true);
62 $main_table->setDeletePerm(
false);
63 $main_table->setDeleteByOwner(
true);
64 $main_table->setEditByOwner(
true);
65 $main_table->setLimited(
false);
66 $main_table->setIsVisible(
true);
67 $main_table->doCreate();
86 $table->doDelete(
false,
true);
89 $this->notification_settings->deleteForObject($this);
127 $mail->setType($action->value);
128 $mail->setActor($this->
user->getId());
129 $mail->setObjId($this->
getId());
131 $mail->setRecord($record);
137 $record->
getTable()->hasPermissionToViewRecord($this->getRefId(), $record,
$user_id) &&
139 $this->notification_settings->has($this,
$user_id, $action)
155 $new_obj->cloneStructure($this->
getRefId());
165 $this->
setRating($original->getRating());
169 foreach ($original->getTables() as $table) {
171 $new_table->setObjId($this->
getId());
172 $new_table->cloneStructure($table);
176 $table->afterClone();
182 $this->is_online = $a_val;
192 $this->rating = $a_val;
202 $this->public_notes = $a_val;
212 $this->approval = $a_val;
235 $stmt = $this->db->queryF(
236 'SELECT id FROM il_dcl_table WHERE obj_id = %s ORDER BY table_order',
241 while ($rec = $this->db->fetchAssoc($stmt)) {
259 if ($table->getIsVisible() && $table->getVisibleTableViews()) {
260 $tables[$table->getId()] = $table;
static _getInstance(int $a_copy_id)
static getTableCache(?int $table_id=null)
const TYPE_DATACOLLECTION
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.
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object.
const TYPE_DATA_COLLECTION
__construct(int $a_id=0, bool $a_reference=true)
Constructor.
getTableById(int $table_id)
ilDclNotification $notification_settings
sendRecordNotification(ilDclNotificationType $action, ilDclBaseRecordModel $record)
setPublicNotes(bool $a_val)
doCreate(bool $clone_mode=false)
cloneStructure(int $original_id)
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
setNotification(bool $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cloneMetaData(ilObject $target_obj)
Copy meta data.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc