ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilADNNotificationUIFormGUI Class Reference

Class ilADNNotificationUIFormGUI. More...

+ Collaboration diagram for ilADNNotificationUIFormGUI:

Public Member Functions

 getHTML ()
 
 setValuesByPost ()
 
 saveObject ()
 

Data Fields

const F_TITLE = 'title'
 
const F_BODY = 'body'
 
const F_TYPE = 'type'
 
const F_TYPE_DURING_EVENT = 'type_during_event'
 
const F_EVENT_DATE = 'event_date'
 
const F_DISPLAY_DATE = 'display_date'
 
const F_PERMANENT = 'permanent'
 
const F_POSITION = 'position'
 
const F_ADDITIONAL_CLASSES = 'additional_classes'
 
const F_PREVENT_LOGIN = 'prevent_login'
 
const F_INTERRUPTIVE = 'interruptive'
 
const F_ALLOWED_USERS = 'allowed_users'
 
const F_DISMISSABLE = 'dismissable'
 
const F_LIMIT_TO_ROLES = 'limit_to_roles'
 
const F_LIMITED_TO_ROLE_IDS = 'limited_to_role_ids'
 
const F_DISPLAY_DATE_START = 'display_date_start'
 
const F_DISPLAY_DATE_END = 'display_date_end'
 
const F_EVENT_DATE_START = 'event_date_start'
 
const F_EVENT_DATE_END = 'event_date_end'
 
const F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'
 
const F_PRESENTATION = 'presentation'
 

Protected Member Functions

 txt (string $var)
 
 infoTxt (string $var)
 
 getDenotations ()
 
 fillObject ()
 
 getRoles (int $filter)
 

Protected Attributes

string $action
 
ilADNNotification $notification
 
ilCtrlInterface $ctrl
 
ILIAS UI Factory $ui
 
ILIAS UI Renderer $renderer
 
ILIAS UI Component Input Container Form Standard $form = null
 
Factory $refinery
 
ilLanguage $lng
 
ilRbacReview $rbac_review
 
Services $http
 

Detailed Description

Member Function Documentation

◆ fillObject()

ilADNNotificationUIFormGUI::fillObject ( )
protected

Definition at line 315 of file class.ilADNNotificationUIFormGUI.php.

References $data, ILIAS\Repository\form(), and ILIAS\UI\examples\Symbol\Glyph\Notification\notification().

Referenced by saveObject().

315  : bool
316  {
317  $data = $this->form->getData();
318  if (!$data instanceof ilADNNotification) {
319  return false;
320  }
321  $this->notification = $data;
322  return true;
323  }
form( $class_path, string $cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDenotations()

ilADNNotificationUIFormGUI::getDenotations ( )
protected
Returns
string[]

Definition at line 94 of file class.ilADNNotificationUIFormGUI.php.

References txt(), ilADNNotification\TYPE_ERROR, ilADNNotification\TYPE_INFO, and ilADNNotification\TYPE_WARNING.

Referenced by getHTML().

94  : array
95  {
96  return [
97  ilADNNotification::TYPE_INFO => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_INFO),
99  ilADNNotification::TYPE_ERROR => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_ERROR),
100  ];
101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTML()

ilADNNotificationUIFormGUI::getHTML ( )

◆ getRoles()

ilADNNotificationUIFormGUI::getRoles ( int  $filter)
protected
Returns
array<int, string>

Definition at line 342 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\int().

Referenced by getHTML().

342  : array
343  {
344  $opt = [];
345  foreach ($this->rbac_review->getRolesByFilter($filter) as $role) {
346  $opt[(int) $role['obj_id']] = $role['title'] . ' (' . $role['obj_id'] . ')';
347  }
348 
349  return $opt;
350  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoTxt()

ilADNNotificationUIFormGUI::infoTxt ( string  $var)
protected

Definition at line 86 of file class.ilADNNotificationUIFormGUI.php.

References txt().

Referenced by getHTML().

86  : string
87  {
88  return $this->txt($var . '_info');
89  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilADNNotificationUIFormGUI::saveObject ( )

Definition at line 325 of file class.ilADNNotificationUIFormGUI.php.

References fillObject(), and ILIAS\UI\examples\Symbol\Glyph\Notification\notification().

325  : bool
326  {
327  if (!$this->fillObject()) {
328  return false;
329  }
330  if ($this->notification->getId() > 0) {
331  $this->notification->update();
332  } else {
333  $this->notification->create();
334  }
335 
336  return $this->notification->getId() > 0;
337  }
+ Here is the call graph for this function:

◆ setValuesByPost()

ilADNNotificationUIFormGUI::setValuesByPost ( )

Definition at line 310 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\form(), and ILIAS\FileDelivery\http().

Referenced by ilADNNotificationGUI\create(), and ilADNNotificationGUI\update().

310  : void
311  {
312  $this->form = $this->form->withRequest($this->http->request());
313  }
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txt()

ilADNNotificationUIFormGUI::txt ( string  $var)
protected

Definition at line 81 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\lng().

Referenced by getDenotations(), getHTML(), and infoTxt().

81  : string
82  {
83  return $this->lng->txt('msg_' . $var);
84  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $action

string ilADNNotificationUIFormGUI::$action
protected

Definition at line 51 of file class.ilADNNotificationUIFormGUI.php.

◆ $ctrl

ilCtrlInterface ilADNNotificationUIFormGUI::$ctrl
protected

Definition at line 54 of file class.ilADNNotificationUIFormGUI.php.

◆ $form

ILIAS UI Component Input Container Form Standard ilADNNotificationUIFormGUI::$form = null
protected

Definition at line 57 of file class.ilADNNotificationUIFormGUI.php.

◆ $http

Services ilADNNotificationUIFormGUI::$http
protected

Definition at line 61 of file class.ilADNNotificationUIFormGUI.php.

◆ $lng

ilLanguage ilADNNotificationUIFormGUI::$lng
protected

Definition at line 59 of file class.ilADNNotificationUIFormGUI.php.

◆ $notification

ilADNNotification ilADNNotificationUIFormGUI::$notification
protected

Definition at line 53 of file class.ilADNNotificationUIFormGUI.php.

Referenced by getHTML().

◆ $rbac_review

ilRbacReview ilADNNotificationUIFormGUI::$rbac_review
protected

Definition at line 60 of file class.ilADNNotificationUIFormGUI.php.

◆ $refinery

Factory ilADNNotificationUIFormGUI::$refinery
protected

Definition at line 58 of file class.ilADNNotificationUIFormGUI.php.

◆ $renderer

ILIAS UI Renderer ilADNNotificationUIFormGUI::$renderer
protected

Definition at line 56 of file class.ilADNNotificationUIFormGUI.php.

◆ $ui

ILIAS UI Factory ilADNNotificationUIFormGUI::$ui
protected

Definition at line 55 of file class.ilADNNotificationUIFormGUI.php.

◆ F_ADDITIONAL_CLASSES

const ilADNNotificationUIFormGUI::F_ADDITIONAL_CLASSES = 'additional_classes'

Definition at line 38 of file class.ilADNNotificationUIFormGUI.php.

◆ F_ALLOWED_USERS

const ilADNNotificationUIFormGUI::F_ALLOWED_USERS = 'allowed_users'

Definition at line 41 of file class.ilADNNotificationUIFormGUI.php.

◆ F_BODY

const ilADNNotificationUIFormGUI::F_BODY = 'body'

Definition at line 31 of file class.ilADNNotificationUIFormGUI.php.

◆ F_DISMISSABLE

const ilADNNotificationUIFormGUI::F_DISMISSABLE = 'dismissable'

Definition at line 42 of file class.ilADNNotificationUIFormGUI.php.

◆ F_DISPLAY_DATE

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE = 'display_date'

Definition at line 35 of file class.ilADNNotificationUIFormGUI.php.

◆ F_DISPLAY_DATE_END

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_END = 'display_date_end'

Definition at line 46 of file class.ilADNNotificationUIFormGUI.php.

◆ F_DISPLAY_DATE_START

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_START = 'display_date_start'

Definition at line 45 of file class.ilADNNotificationUIFormGUI.php.

◆ F_EVENT_DATE

const ilADNNotificationUIFormGUI::F_EVENT_DATE = 'event_date'

Definition at line 34 of file class.ilADNNotificationUIFormGUI.php.

◆ F_EVENT_DATE_END

const ilADNNotificationUIFormGUI::F_EVENT_DATE_END = 'event_date_end'

Definition at line 48 of file class.ilADNNotificationUIFormGUI.php.

◆ F_EVENT_DATE_START

const ilADNNotificationUIFormGUI::F_EVENT_DATE_START = 'event_date_start'

Definition at line 47 of file class.ilADNNotificationUIFormGUI.php.

◆ F_INTERRUPTIVE

const ilADNNotificationUIFormGUI::F_INTERRUPTIVE = 'interruptive'

Definition at line 40 of file class.ilADNNotificationUIFormGUI.php.

◆ F_LIMIT_TO_ROLES

const ilADNNotificationUIFormGUI::F_LIMIT_TO_ROLES = 'limit_to_roles'

Definition at line 43 of file class.ilADNNotificationUIFormGUI.php.

◆ F_LIMITED_TO_ROLE_IDS

const ilADNNotificationUIFormGUI::F_LIMITED_TO_ROLE_IDS = 'limited_to_role_ids'

Definition at line 44 of file class.ilADNNotificationUIFormGUI.php.

◆ F_PERMANENT

const ilADNNotificationUIFormGUI::F_PERMANENT = 'permanent'

Definition at line 36 of file class.ilADNNotificationUIFormGUI.php.

◆ F_POSITION

const ilADNNotificationUIFormGUI::F_POSITION = 'position'

Definition at line 37 of file class.ilADNNotificationUIFormGUI.php.

◆ F_PRESENTATION

const ilADNNotificationUIFormGUI::F_PRESENTATION = 'presentation'

Definition at line 50 of file class.ilADNNotificationUIFormGUI.php.

◆ F_PREVENT_LOGIN

const ilADNNotificationUIFormGUI::F_PREVENT_LOGIN = 'prevent_login'

Definition at line 39 of file class.ilADNNotificationUIFormGUI.php.

◆ F_SHOW_TO_ALL_ROLES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'

Definition at line 49 of file class.ilADNNotificationUIFormGUI.php.

◆ F_TITLE

const ilADNNotificationUIFormGUI::F_TITLE = 'title'

Definition at line 30 of file class.ilADNNotificationUIFormGUI.php.

◆ F_TYPE

const ilADNNotificationUIFormGUI::F_TYPE = 'type'

Definition at line 32 of file class.ilADNNotificationUIFormGUI.php.

◆ F_TYPE_DURING_EVENT

const ilADNNotificationUIFormGUI::F_TYPE_DURING_EVENT = 'type_during_event'

Definition at line 33 of file class.ilADNNotificationUIFormGUI.php.


The documentation for this class was generated from the following file: