X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/ca46631d1280ea5c387ae40b0b9ad1f77cb4e1c0..d3c8ab5a395adc36ec3095e7effb6f0db195887b:/Entity/Snippet.php diff --git a/Entity/Snippet.php b/Entity/Snippet.php index ee5b262..fa5fe99 100644 --- a/Entity/Snippet.php +++ b/Entity/Snippet.php @@ -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')); }