+ /**
+ * Add user
+ *
+ * @param User $user
+ *
+ * @return Location
+ */
+ public function addUser(User $user): Location {
+ //Add from owning side
+ $user->addSubscriber($this);
+
+ $this->users[] = $user;
+
+ return $this;
+ }
+
+ /**
+ * Remove user
+ *
+ * @param User $user
+ * @return bool
+ */
+ public function removeUser(User $user): bool {
+ //Remove from owning side
+ $user->removeSubscriber($this);
+
+ 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 (($location = $eventArgs->getEntity()) instanceof Location) {
+ //Set updated value
+ $location->setUpdated(new \DateTime('now'));
+ }
+ }
+