From f73d0d2ac9daee5eaa03a7b89c639678fec46467 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 1 Dec 2016 22:52:58 -0500 Subject: Make user mentions great again --- app/Event/GenericEvent.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'app/Event/GenericEvent.php') diff --git a/app/Event/GenericEvent.php b/app/Event/GenericEvent.php index 94a51479..e87d9481 100644 --- a/app/Event/GenericEvent.php +++ b/app/Event/GenericEvent.php @@ -14,6 +14,28 @@ class GenericEvent extends BaseEvent implements ArrayAccess $this->container = $values; } + public function getTaskId() + { + if (isset($this->container['task']['id'])) { + return $this->container['task']['id']; + } + + if (isset($this->container['task_id'])) { + return $this->container['task_id']; + } + + return null; + } + + public function getProjectId() + { + if (isset($this->container['task']['project_id'])) { + return $this->container['task']['project_id']; + } + + return null; + } + public function getAll() { return $this->container; -- cgit v1.2.3