namespace Rapsys\UserBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Event\PreUpdateEventArgs;
use Symfony\Component\Security\Core\User\UserInterface;
use Rapsys\UserBundle\Entity\Civility;
*/
protected $password;
+ /**
+ * @var string
+ */
+ protected $slug;
+
/**
* @var bool
*/
return $this->password;
}
+ /**
+ * Set slug
+ *
+ * @param string $slug
+ *
+ * @return User
+ */
+ public function setSlug(?string $slug): User {
+ $this->slug = $slug;
+
+ return $this;
+ }
+
+ /**
+ * Get slug
+ *
+ * @return string
+ */
+ public function getSlug(): ?string {
+ return $this->slug;
+ }
+
/**
* Set active
*
/**
* {@inheritdoc}
*/
- public function preUpdate(\Doctrine\ORM\Event\PreUpdateEventArgs $eventArgs) {
+ public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have an user instance
if (($user = $eventArgs->getEntity()) instanceof User) {
//Set updated value