]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Snippet.php
Cleanup
[airbundle] / Entity / Snippet.php
index ee5b262e78f600007529b2d12b5782463324ec05..fa5fe996fbcc68d74fc4ccf6d7dec693aaeef29a 100644 (file)
@@ -106,9 +106,9 @@ class Snippet {
                $this->donate = null;
                $this->link = null;
                $this->profile = null;
+               $this->location = null;
                $this->created = new \DateTime('now');
                $this->updated = new \DateTime('now');
-               $this->location = null;
        }
 
        /**
@@ -430,9 +430,9 @@ class Snippet {
        /**
         * {@inheritdoc}
         */
-       public function preUpdate(\Doctrine\ORM\Event\PreUpdateEventArgs  $eventArgs) {
+       public function preUpdate(PreUpdateEventArgs $eventArgs) {
                //Check that we have an snippet instance
-               if (($snippet = $eventArgs->getEntity()) instanceof Snippet) {
+               if (($snippet = $eventArgs->getObject()) instanceof Snippet) {
                        //Set updated value
                        $snippet->setUpdated(new \DateTime('now'));
                }