Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
NotifierPool Class Reference
Inheritance diagram for NotifierPool:
NotifierInterface

Public Member Functions

 __construct (NotifierList $notifierList)
 
 add ($severity, $title, $description, $url='', $isInternal=true)
 
 addCritical ($title, $description, $url='', $isInternal=true)
 
 addMajor ($title, $description, $url='', $isInternal=true)
 
 addMinor ($title, $description, $url='', $isInternal=true)
 
 addNotice ($title, $description, $url='', $isInternal=true)
 

Protected Attributes

 $notifierList
 

Detailed Description

Default notifiers. Iterates through all registered notifiers to process message

Class NotifierPool

Definition at line 14 of file NotifierPool.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( NotifierList  $notifierList)
Parameters
NotifierList$notifierList

Definition at line 24 of file NotifierPool.php.

25  {
26  $this->notifierList = $notifierList;
27  }

Member Function Documentation

◆ add()

add (   $severity,
  $title,
  $description,
  $url = '',
  $isInternal = true 
)

Add new message

Parameters
int$severity
string$title
string|string[]$description
string$url
bool$isInternal
Exceptions

Implements NotifierInterface.

Definition at line 40 of file NotifierPool.php.

41  {
42  foreach ($this->notifierList->asArray() as $notifier) {
43  $notifier->add($severity, $title, $description, $url, $isInternal);
44  }
45  return $this;
46  }
$title
Definition: default.phtml:14

◆ addCritical()

addCritical (   $title,
  $description,
  $url = '',
  $isInternal = true 
)

Add critical severity message

Parameters
string$title
string|string[]$description
string$url
bool$isInternal
Returns
$this

Implements NotifierInterface.

Definition at line 57 of file NotifierPool.php.

58  {
59  foreach ($this->notifierList->asArray() as $notifier) {
60  $notifier->addCritical($title, $description, $url, $isInternal);
61  }
62  return $this;
63  }
$title
Definition: default.phtml:14

◆ addMajor()

addMajor (   $title,
  $description,
  $url = '',
  $isInternal = true 
)

Add major severity message

Parameters
string$title
string|string[]$description
string$url
bool$isInternal
Returns
$this

Implements NotifierInterface.

Definition at line 74 of file NotifierPool.php.

75  {
76  foreach ($this->notifierList->asArray() as $notifier) {
77  $notifier->addMajor($title, $description, $url, $isInternal);
78  }
79  return $this;
80  }
$title
Definition: default.phtml:14

◆ addMinor()

addMinor (   $title,
  $description,
  $url = '',
  $isInternal = true 
)

Add minor severity message

Parameters
string$title
string|string[]$description
string$url
bool$isInternal
Returns
$this

Implements NotifierInterface.

Definition at line 91 of file NotifierPool.php.

92  {
93  foreach ($this->notifierList->asArray() as $notifier) {
94  $notifier->addMinor($title, $description, $url, $isInternal);
95  }
96  return $this;
97  }
$title
Definition: default.phtml:14

◆ addNotice()

addNotice (   $title,
  $description,
  $url = '',
  $isInternal = true 
)

Add notice

Parameters
string$title
string|string[]$description
string$url
bool$isInternal
Returns
$this

Implements NotifierInterface.

Definition at line 108 of file NotifierPool.php.

109  {
110  foreach ($this->notifierList->asArray() as $notifier) {
111  $notifier->addNotice($title, $description, $url, $isInternal);
112  }
113  return $this;
114  }
$title
Definition: default.phtml:14

Field Documentation

◆ $notifierList

$notifierList
protected

Definition at line 19 of file NotifierPool.php.


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