ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilADNNotificationUIFormGUI Class Reference

Class ilADNNotificationUIFormGUI. More...

+ Collaboration diagram for ilADNNotificationUIFormGUI:

Public Member Functions

 getHTML ()
 
 setValuesByPost ()
 
 fillForm ()
 
 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 ($filter)
 

Protected Attributes

 $notification
 
 $ctrl
 
 $ui
 
 $renderer
 
 $form
 
 $action
 
 $request
 
 $lng
 
 $called = []
 

Static Protected Attributes

static $tags = ['a', 'strong', 'ol', 'ul', 'li', 'p']
 

Private Attributes

 $refinery
 

Detailed Description

Member Function Documentation

◆ fillForm()

ilADNNotificationUIFormGUI::fillForm ( )

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

Referenced by ilADNNotificationGUI\add(), and ilADNNotificationGUI\edit().

343  : void
344  {
345  }
+ Here is the caller graph for this function:

◆ fillObject()

ilADNNotificationUIFormGUI::fillObject ( )
protected
Returns
bool

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

References notification().

Referenced by saveObject().

350  : bool
351  {
352  $this->notification = $this->form->getData();
353  return $this->notification instanceof ilADNNotification;
354  }
notification()
Definition: notification.php:2
+ 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 117 of file class.ilADNNotificationUIFormGUI.php.

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

Referenced by getHTML().

117  : array
118  {
119  return [
120  ilADNNotification::TYPE_INFO => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_INFO),
122  ilADNNotification::TYPE_ERROR => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_ERROR),
123  ];
124  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTML()

ilADNNotificationUIFormGUI::getHTML ( )

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

References $c, $format, $notification, $section, ilRbacReview\FILTER_ALL_GLOBAL, getDenotations(), getRoles(), infoTxt(), notification(), txt(), and ui().

126  : string
127  {
128  return $this->renderer->render($this->form);
129  }
+ Here is the call graph for this function:

◆ getRoles()

ilADNNotificationUIFormGUI::getRoles (   $filter)
protected
Parameters
$filter
Returns
array|int[]

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

References $DIC.

Referenced by getHTML().

374  : array
375  {
376  global $DIC;
377  $opt = [];
378  foreach ($DIC->rbac()->review()->getRolesByFilter($filter) as $role) {
379  $opt[$role['obj_id']] = $role['title'] . ' (' . $role['obj_id'] . ')';
380  }
381 
382  return $opt;
383  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ infoTxt()

ilADNNotificationUIFormGUI::infoTxt ( string  $var)
protected
Parameters
string$var
Returns
string

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

References txt().

Referenced by getHTML().

109  : ?string
110  {
111  return $this->txt($var . '_info');
112  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilADNNotificationUIFormGUI::saveObject ( )

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

References fillObject(), and notification().

356  : int
357  {
358  if (!$this->fillObject()) {
359  return false;
360  }
361  if ($this->notification->getId() > 0) {
362  $this->notification->update();
363  } else {
364  $this->notification->create();
365  }
366 
367  return $this->notification->getId();
368  }
notification()
Definition: notification.php:2
+ Here is the call graph for this function:

◆ setValuesByPost()

ilADNNotificationUIFormGUI::setValuesByPost ( )

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

References $DIC.

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

337  : void
338  {
339  global $DIC;
340  $this->form = $this->form->withRequest($DIC->http()->request());
341  }
global $DIC
Definition: goto.php:24
+ Here is the caller graph for this function:

◆ txt()

ilADNNotificationUIFormGUI::txt ( string  $var)
protected
Parameters
string$var
Returns
string

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

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

100  : string
101  {
102  return $this->lng->txt('msg_' . $var);
103  }
+ Here is the caller graph for this function:

Field Documentation

◆ $action

ilADNNotificationUIFormGUI::$action
protected

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

◆ $called

ilADNNotificationUIFormGUI::$called = []
protected

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

◆ $ctrl

ilADNNotificationUIFormGUI::$ctrl
protected

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

◆ $form

ilADNNotificationUIFormGUI::$form
protected

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

◆ $lng

ilADNNotificationUIFormGUI::$lng
protected

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

◆ $notification

ilADNNotificationUIFormGUI::$notification
protected

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

Referenced by getHTML().

◆ $refinery

ilADNNotificationUIFormGUI::$refinery
private

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

◆ $renderer

ilADNNotificationUIFormGUI::$renderer
protected

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

◆ $request

ilADNNotificationUIFormGUI::$request
protected

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

◆ $tags

ilADNNotificationUIFormGUI::$tags = ['a', 'strong', 'ol', 'ul', 'li', 'p']
staticprotected

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

◆ $ui

ilADNNotificationUIFormGUI::$ui
protected

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

◆ F_ADDITIONAL_CLASSES

const ilADNNotificationUIFormGUI::F_ADDITIONAL_CLASSES = 'additional_classes'

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

◆ F_ALLOWED_USERS

const ilADNNotificationUIFormGUI::F_ALLOWED_USERS = 'allowed_users'

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

◆ F_BODY

const ilADNNotificationUIFormGUI::F_BODY = 'body'

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

◆ F_DISMISSABLE

const ilADNNotificationUIFormGUI::F_DISMISSABLE = 'dismissable'

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

◆ F_DISPLAY_DATE

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE = 'display_date'

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

◆ F_DISPLAY_DATE_END

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_END = 'display_date_end'

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

◆ F_DISPLAY_DATE_START

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_START = 'display_date_start'

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

◆ F_EVENT_DATE

const ilADNNotificationUIFormGUI::F_EVENT_DATE = 'event_date'

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

◆ F_EVENT_DATE_END

const ilADNNotificationUIFormGUI::F_EVENT_DATE_END = 'event_date_end'

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

◆ F_EVENT_DATE_START

const ilADNNotificationUIFormGUI::F_EVENT_DATE_START = 'event_date_start'

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

◆ F_INTERRUPTIVE

const ilADNNotificationUIFormGUI::F_INTERRUPTIVE = 'interruptive'

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

◆ F_LIMIT_TO_ROLES

const ilADNNotificationUIFormGUI::F_LIMIT_TO_ROLES = 'limit_to_roles'

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

◆ F_LIMITED_TO_ROLE_IDS

const ilADNNotificationUIFormGUI::F_LIMITED_TO_ROLE_IDS = 'limited_to_role_ids'

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

◆ F_PERMANENT

const ilADNNotificationUIFormGUI::F_PERMANENT = 'permanent'

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

◆ F_POSITION

const ilADNNotificationUIFormGUI::F_POSITION = 'position'

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

◆ F_PRESENTATION

const ilADNNotificationUIFormGUI::F_PRESENTATION = 'presentation'

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

◆ F_PREVENT_LOGIN

const ilADNNotificationUIFormGUI::F_PREVENT_LOGIN = 'prevent_login'

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

◆ F_SHOW_TO_ALL_ROLES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'

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

◆ F_TITLE

const ilADNNotificationUIFormGUI::F_TITLE = 'title'

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

◆ F_TYPE

const ilADNNotificationUIFormGUI::F_TYPE = 'type'

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

◆ F_TYPE_DURING_EVENT

const ilADNNotificationUIFormGUI::F_TYPE_DURING_EVENT = 'type_during_event'

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


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