ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilADNNotificationUIFormGUI Class Reference
+ 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_HAS_LANGUAGE_LIMITATION = 'has_language_limitation'
 
const F_LIMITED_TO_LANGUAGES = 'limited_to_languages'
 
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_LANGUAGES = 'show_to_all_languages'
 
const F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'
 
const F_LANGUAGES = 'languages'
 
const F_PRESENTATION = 'presentation'
 

Protected Member Functions

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

Protected Attributes

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 355 of file class.ilADNNotificationUIFormGUI.php.

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

Referenced by saveObject().

355  : bool
356  {
357  $data = $this->form->getData();
358  if (!$data instanceof ilADNNotification) {
359  return false;
360  }
361  $this->notification = $data;
362  return true;
363  }
form( $class_path, string $cmd, string $submit_caption="")
+ 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 92 of file class.ilADNNotificationUIFormGUI.php.

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

Referenced by getHTML().

92  : array
93  {
94  return [
95  ilADNNotification::TYPE_INFO => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_INFO),
97  ilADNNotification::TYPE_ERROR => $this->txt(self::F_TYPE . '_' . ilADNNotification::TYPE_ERROR),
98  ];
99  }
+ 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 382 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\int().

Referenced by getHTML().

382  : array
383  {
384  $opt = [];
385  foreach ($this->rbac_review->getRolesByFilter($filter) as $role) {
386  $opt[(int) $role['obj_id']] = $role['title'] . ' (' . $role['obj_id'] . ')';
387  }
388 
389  return $opt;
390  }
+ 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 84 of file class.ilADNNotificationUIFormGUI.php.

References txt().

Referenced by getHTML().

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

◆ saveObject()

ilADNNotificationUIFormGUI::saveObject ( )

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

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

365  : bool
366  {
367  if (!$this->fillObject()) {
368  return false;
369  }
370  if ($this->notification->getId() > 0) {
371  $this->notification->update();
372  } else {
373  $this->notification->create();
374  }
375 
376  return $this->notification->getId() > 0;
377  }
+ Here is the call graph for this function:

◆ setValuesByPost()

ilADNNotificationUIFormGUI::setValuesByPost ( )

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

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

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

350  : void
351  {
352  $this->form = $this->form->withRequest($this->http->request());
353  }
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd, string $submit_caption="")
+ 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 79 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\lng().

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

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

Field Documentation

◆ $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.

◆ $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 37 of file class.ilADNNotificationUIFormGUI.php.

◆ F_ALLOWED_USERS

const ilADNNotificationUIFormGUI::F_ALLOWED_USERS = 'allowed_users'

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

◆ F_BODY

const ilADNNotificationUIFormGUI::F_BODY = 'body'

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

◆ F_DISMISSABLE

const ilADNNotificationUIFormGUI::F_DISMISSABLE = 'dismissable'

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

◆ F_DISPLAY_DATE

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE = 'display_date'

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

◆ F_DISPLAY_DATE_END

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_END = 'display_date_end'

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

◆ F_DISPLAY_DATE_START

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_START = 'display_date_start'

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

◆ F_EVENT_DATE

const ilADNNotificationUIFormGUI::F_EVENT_DATE = 'event_date'

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

◆ F_EVENT_DATE_END

const ilADNNotificationUIFormGUI::F_EVENT_DATE_END = 'event_date_end'

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

◆ F_EVENT_DATE_START

const ilADNNotificationUIFormGUI::F_EVENT_DATE_START = 'event_date_start'

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

◆ F_HAS_LANGUAGE_LIMITATION

const ilADNNotificationUIFormGUI::F_HAS_LANGUAGE_LIMITATION = 'has_language_limitation'

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

◆ F_INTERRUPTIVE

const ilADNNotificationUIFormGUI::F_INTERRUPTIVE = 'interruptive'

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

◆ F_LANGUAGES

const ilADNNotificationUIFormGUI::F_LANGUAGES = 'languages'

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

◆ F_LIMIT_TO_ROLES

const ilADNNotificationUIFormGUI::F_LIMIT_TO_ROLES = 'limit_to_roles'

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

◆ F_LIMITED_TO_LANGUAGES

const ilADNNotificationUIFormGUI::F_LIMITED_TO_LANGUAGES = 'limited_to_languages'

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 45 of file class.ilADNNotificationUIFormGUI.php.

◆ F_PERMANENT

const ilADNNotificationUIFormGUI::F_PERMANENT = 'permanent'

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

◆ F_POSITION

const ilADNNotificationUIFormGUI::F_POSITION = 'position'

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

◆ F_PRESENTATION

const ilADNNotificationUIFormGUI::F_PRESENTATION = 'presentation'

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

◆ F_PREVENT_LOGIN

const ilADNNotificationUIFormGUI::F_PREVENT_LOGIN = 'prevent_login'

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

◆ F_SHOW_TO_ALL_LANGUAGES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_LANGUAGES = 'show_to_all_languages'

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

◆ F_SHOW_TO_ALL_ROLES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'

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

◆ F_TITLE

const ilADNNotificationUIFormGUI::F_TITLE = 'title'

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

◆ F_TYPE

const ilADNNotificationUIFormGUI::F_TYPE = 'type'

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

◆ F_TYPE_DURING_EVENT

const ilADNNotificationUIFormGUI::F_TYPE_DURING_EVENT = 'type_during_event'

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


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