X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FNotifications%2FAction.php;fp=src%2FWallabag%2FCoreBundle%2FNotifications%2FAction.php;h=d032adf9568bc0e4305bd1366d65be032ff22ed7;hb=378aaefbbf60698c7b8faafc20f6b8cb22357e31;hp=0000000000000000000000000000000000000000;hpb=b5d7eb148c4cd62ff187b08765f0c13c7d330fcf;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Notifications/Action.php b/src/Wallabag/CoreBundle/Notifications/Action.php new file mode 100644 index 00000000..d032adf9 --- /dev/null +++ b/src/Wallabag/CoreBundle/Notifications/Action.php @@ -0,0 +1,91 @@ +label; + } + + /** + * @param string $label + * + * @return ActionInterface + */ + public function setLabel($label) + { + $this->label = $label; + + return $this; + } + + /** + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * @param int $type + * + * @return ActionInterface + * + * @throws \InvalidArgumentException + */ + public function setType($type) + { + if ($type <= 0 || $type > 4) { + throw new \InvalidArgumentException('The given type option is invalid'); + } + $this->type = $type; + + return $this; + } + + /** + * @return string + */ + public function getLink() + { + return $this->link; + } + + /** + * @param string $link + * + * @return ActionInterface + */ + public function setLink($link) + { + $this->link = $link; + + return $this; + } +}