25 $this->tab_handling->initTabs(
48 return $this->
reset();
51 return $this->
index();
58 protected function index() : string
60 if ($this->access->hasUserPermissionTo(
'write')) {
62 $button->setCaption($this->lng->txt(
'common_add_msg'),
false);
63 $button->setUrl($this->ctrl->getLinkTarget($this, self::CMD_ADD));
64 $this->toolbar->addButtonInstance($button);
68 return $notMessageTableGUI->getHTML();
71 protected function add() : string
75 $this->ctrl->getLinkTarget($this, self::CMD_CREATE)
78 return $form->getHTML();
85 $this->ctrl->getLinkTarget($this, self::CMD_CREATE)
87 $form->setValuesByPost();
88 if ($form->saveObject()) {
89 ilUtil::sendSuccess($this->lng->txt(
'msg_success_created'),
true);
90 $this->ctrl->redirect($this, self::CMD_DEFAULT);
92 return $form->getHTML();
97 $this->ctrl->setParameter($this, self::IDENTIFIER,
null);
98 $this->ctrl->redirect($this, self::CMD_DEFAULT);
101 protected function edit() : string
108 return $form->getHTML();
115 $form->setValuesByPost();
116 if ($form->saveObject()) {
117 ilUtil::sendSuccess($this->lng->txt(
'msg_success_updated'),
true);
118 $this->ctrl->redirect($this, self::CMD_DEFAULT);
120 return $form->getHTML();
127 $confirmation->setFormAction($this->ctrl->getFormAction($this));
128 $confirmation->addItem(self::IDENTIFIER, $notification->getId(), $notification->getTitle());
129 $confirmation->setCancel($this->lng->txt(
'msg_form_button_cancel'), self::CMD_CANCEL);
130 $confirmation->setConfirm($this->lng->txt(
'msg_form_button_delete'), self::CMD_DELETE);
132 return $confirmation->getHTML();
135 protected function delete() :
void
138 $notification->delete();
139 ilUtil::sendSuccess($this->lng->txt(
'msg_success_deleted'),
true);
147 $confirmation->setFormAction($this->ctrl->getFormAction($this));
148 $confirmation->addItem(self::IDENTIFIER, $notification->getId(), $notification->getTitle());
149 $confirmation->setCancel($this->lng->txt(
'msg_form_button_cancel'), self::CMD_CANCEL);
150 $confirmation->setConfirm($this->lng->txt(
'msg_form_button_reset'), self::CMD_RESET);
152 return $confirmation->getHTML();
159 $notification->resetForAllUsers();
160 ilUtil::sendSuccess($this->lng->txt(
'msg_success_reset'),
true);
169 if (isset($this->
http->request()->getParsedBody()[self::IDENTIFIER])) {
171 } elseif (isset($this->
http->request()->getParsedBody()[
'interruptive_items'][0])) {
172 $identifier = $this->
http->request()->getParsedBody()[
'interruptive_items'][0];
static findOrFail($primary_key, array $add_constructor_args=array())
Tries to find the object and throws an Exception if object is not found, instead of returning null.
An exception for terminatinating execution or to throw for unit testing.
Class ilADNNotificationGUI @ilCtrl_IsCalledBy ilADNNotificationGUI: ilObjAdministrativeNotificationGU...
getNotificationFromRequest()
Class ilADNNotificationTableGUI.
Confirmation screen class.
static http()
Fetches the global http state from ILIAS.