ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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
 
Renderer $renderer
 
Standard $form = null
 
Factory $refinery
 
ilLanguage $lng
 
ilRbacReview $rbac_review
 
Services $http
 

Detailed Description

Member Function Documentation

◆ fillObject()

ilADNNotificationUIFormGUI::fillObject ( )
protected

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

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

Referenced by saveObject().

352  : bool
353  {
354  $data = $this->form->getData();
355  if (!$data instanceof ilADNNotification) {
356  return false;
357  }
358  $this->notification = $data;
359  return true;
360  }
notification()
description: > Example for rendring a notification glyph.
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 93 of file class.ilADNNotificationUIFormGUI.php.

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

Referenced by getHTML().

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

References ILIAS\Repository\int().

Referenced by getHTML().

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

References txt().

Referenced by getHTML().

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

◆ saveObject()

ilADNNotificationUIFormGUI::saveObject ( )

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

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

362  : bool
363  {
364  if (!$this->fillObject()) {
365  return false;
366  }
367  if ($this->notification->getId() > 0) {
368  $this->notification->update();
369  } else {
370  $this->notification->create();
371  }
372 
373  return $this->notification->getId() > 0;
374  }
notification()
description: > Example for rendring a notification glyph.
+ Here is the call graph for this function:

◆ setValuesByPost()

ilADNNotificationUIFormGUI::setValuesByPost ( )

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

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

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

347  : void
348  {
349  $this->form = $this->form->withRequest($this->http->request());
350  }
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 80 of file class.ilADNNotificationUIFormGUI.php.

References ILIAS\Repository\lng().

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

80  : string
81  {
82  return $this->lng->txt('msg_' . $var);
83  }
+ 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 55 of file class.ilADNNotificationUIFormGUI.php.

◆ $form

Standard ilADNNotificationUIFormGUI::$form = null
protected

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

◆ $http

Services ilADNNotificationUIFormGUI::$http
protected

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

◆ $lng

ilLanguage ilADNNotificationUIFormGUI::$lng
protected

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

◆ $rbac_review

ilRbacReview ilADNNotificationUIFormGUI::$rbac_review
protected

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

◆ $refinery

Factory ilADNNotificationUIFormGUI::$refinery
protected

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

◆ $renderer

Renderer ilADNNotificationUIFormGUI::$renderer
protected

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

◆ $ui

ILIAS UI Factory ilADNNotificationUIFormGUI::$ui
protected

Definition at line 56 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 48 of file class.ilADNNotificationUIFormGUI.php.

◆ F_DISPLAY_DATE_START

const ilADNNotificationUIFormGUI::F_DISPLAY_DATE_START = 'display_date_start'

Definition at line 47 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 50 of file class.ilADNNotificationUIFormGUI.php.

◆ F_EVENT_DATE_START

const ilADNNotificationUIFormGUI::F_EVENT_DATE_START = 'event_date_start'

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

◆ F_HAS_LANGUAGE_LIMITATION

const ilADNNotificationUIFormGUI::F_HAS_LANGUAGE_LIMITATION = 'has_language_limitation'

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

◆ F_INTERRUPTIVE

const ilADNNotificationUIFormGUI::F_INTERRUPTIVE = 'interruptive'

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

◆ F_LANGUAGES

const ilADNNotificationUIFormGUI::F_LANGUAGES = 'languages'

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

◆ F_LIMIT_TO_ROLES

const ilADNNotificationUIFormGUI::F_LIMIT_TO_ROLES = 'limit_to_roles'

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

◆ F_LIMITED_TO_LANGUAGES

const ilADNNotificationUIFormGUI::F_LIMITED_TO_LANGUAGES = 'limited_to_languages'

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

◆ F_LIMITED_TO_ROLE_IDS

const ilADNNotificationUIFormGUI::F_LIMITED_TO_ROLE_IDS = 'limited_to_role_ids'

Definition at line 46 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 54 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_LANGUAGES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_LANGUAGES = 'show_to_all_languages'

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

◆ F_SHOW_TO_ALL_ROLES

const ilADNNotificationUIFormGUI::F_SHOW_TO_ALL_ROLES = 'show_to_all_roles'

Definition at line 52 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: