diff options
Diffstat (limited to 'lib/private/notification/action.php')
-rw-r--r-- | lib/private/notification/action.php | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/lib/private/notification/action.php b/lib/private/notification/action.php index 6de8a1a4bbc..958b085b38e 100644 --- a/lib/private/notification/action.php +++ b/lib/private/notification/action.php @@ -39,6 +39,9 @@ class Action implements IAction { /** @var string */ protected $icon; + /** @var bool */ + protected $primary; + /** * Constructor */ @@ -95,6 +98,27 @@ class Action implements IAction { } /** + * @param $primary bool + * @throws \InvalidArgumentException if $primary is invalid + * @since 9.0.0 + */ + public function setPrimary($primary) { + if (!is_bool($primary)) { + throw new \InvalidArgumentException('The given primary option is invalid'); + } + + $this->primary = $primary; + } + + /** + * @return bool + * @since 9.0.0 + */ + public function isPrimary() { + return $this->primary; + } + + /** * @param string $link * @param string $requestType * @return $this @@ -130,28 +154,6 @@ class Action implements IAction { } /** - * @param string $icon - * @return $this - * @throws \InvalidArgumentException if the icon is invalid - * @since 8.2.0 - */ - public function setIcon($icon) { - if (!is_string($icon) || $icon === '' || isset($icon[64])) { - throw new \InvalidArgumentException('The given icon is invalid'); - } - $this->icon = $icon; - return $this; - } - - /** - * @return string - * @since 8.2.0 - */ - public function getIcon() { - return $this->icon; - } - - /** * @return bool */ public function isValid() { |