]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php
WIP
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Event / Activity / Actions / Annotation / AnnotationEvent.php
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php
new file mode 100644 (file)
index 0000000..b4cb93a
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Wallabag\CoreBundle\Event\Activity\Actions\Annotation;
+
+use Symfony\Component\EventDispatcher\Event;
+use Wallabag\AnnotationBundle\Entity\Annotation;
+
+/**
+ * This event is fired when annotation-relative stuff is made.
+ */
+abstract class AnnotationEvent extends Event
+{
+    protected $annotation;
+
+    /**
+     * AnnotationEvent constructor.
+     * @param Annotation $annotation
+     */
+    public function __construct(Annotation $annotation)
+    {
+        $this->annotation = $annotation;
+    }
+
+    /**
+     * @return Annotation
+     */
+    public function getAnnotation()
+    {
+        return $this->annotation;
+    }
+
+    /**
+     * @param Annotation $annotation
+     */
+    public function setAnnotation(Annotation $annotation)
+    {
+        $this->annotation = $annotation;
+    }
+}