226 if ($table->getTitle() ===
$data[
'edit'][
'title'] && $table->getId() !== $this->table->getId()) {
227 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->
lng->txt(
'dcl_table_title_unique'));
228 $this->tpl->setContent($this->ui_renderer->render(
$form));
233 $this->table->setObjId($this->obj_id);
234 $this->table->setTitle(
$data[
'edit'][
'title']);
235 $this->table->setDescription(
$data[
'edit'][
'description']);
236 $this->table->setIsVisible(
$data[
'edit'][
'visible']);
238 $this->table->setExportEnabled(
$data[
'table'][
'export_enabled']);
239 $this->table->setImportEnabled(
$data[
'table'][
'import_enabled']);
240 $this->table->setPublicCommentsEnabled(
$data[
'table'][
'comments_enabled']);
242 $this->table->setAddPerm(
$data[
'record'][
'add_perm'] !==
null);
243 $this->table->setSaveConfirmation(
$data[
'record'][
'add_perm'][
'save_confirmation'] ??
false);
244 $this->table->setEditPerm(
$data[
'record'][
'edit_perm'] !==
'none');
245 $this->table->setEditByOwner(
$data[
'record'][
'edit_perm'] ===
'own');
246 $this->table->setDeletePerm(
$data[
'record'][
'delete_perm'] !==
'none');
247 $this->table->setDeleteByOwner(
$data[
'record'][
'delete_perm'] ===
'own');
248 $this->table->setViewOwnRecordsPerm(
$data[
'record'][
'view_own_records_perm']);
249 $this->table->setLimited(
$data[
'record'][
'limited'] !==
null);
250 if (
$data[
'record'][
'limited'][
'limit_start'] ??
null !==
null) {
251 $this->table->setLimitStart(
$data[
'record'][
'limited'][
'limit_start']->format(
'Y-m-d H:i:s'));
253 $this->table->setLimitStart(
'');
255 if (
$data[
'record'][
'limited'][
'limit_end'] ??
null !==
null) {
256 $this->table->setLimitEnd(
$data[
'record'][
'limited'][
'limit_end']->format(
'Y-m-d H:i:s'));
258 $this->table->setLimitEnd(
'');
262 $this->table->doCreate();
265 $this->table->setDefaultSortField(
$data[
'table'][
'default_sort_field']);
266 $this->table->setDefaultSortFieldOrder(
$data[
'table'][
'default_sort_field_order']);
267 $this->table->doUpdate();
270 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->
lng->txt(
$message),
true);
271 $this->
ctrl->redirectByClass(ilDclTableEditGUI::class,
'edit');
273 $this->tpl->setContent($this->ui_renderer->render(
$form));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
initForm(bool $create=true)
static checkActionForObjId(string $action, int $obj_id)