+ /**
+ * Add snippet
+ *
+ * @param Snippet $snippet
+ *
+ * @return Location
+ */
+ public function addSnippet(Snippet $snippet): Location {
+ $this->snippets[] = $snippet;
+
+ return $this;
+ }
+
+ /**
+ * Remove snippet
+ *
+ * @param Snippet $snippet
+ * @return boolean
+ */
+ public function removeSnippet(Snippet $snippet): bool {
+ return $this->snippets->removeElement($snippet);
+ }
+
+ /**
+ * Get snippets
+ *
+ * @return ArrayCollection
+ */
+ public function getSnippets(): ArrayCollection {
+ return $this->snippets;
+ }
+
+ /**
+ * Add user
+ *
+ * @param User $user
+ *
+ * @return Location
+ */
+ public function addUser(User $user): Location {
+ $this->users[] = $user;
+
+ return $this;
+ }
+
+ /**
+ * Remove user
+ *
+ * @param User $user
+ * @return boolean
+ */
+ public function removeUser(User $user): bool {
+ return $this->users->removeElement($user);
+ }
+
+ /**
+ * Get users
+ *
+ * @return ArrayCollection
+ */
+ public function getUsers(): ArrayCollection {
+ return $this->users;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function preUpdate(PreUpdateEventArgs $eventArgs) {
+ //Check that we have a location instance
+ if (($user = $eventArgs->getEntity()) instanceof Location) {
+ //Set updated value
+ $user->setUpdated(new \DateTime('now'));
+ }
+ }
+