*/
private $config;
+ /**
+ * @ORM\OneToMany(targetEntity="Tag", mappedBy="user", cascade={"remove"})
+ */
+ private $tags;
+
public function __construct()
{
- $this->salt = md5(uniqid(null, true));
- $this->entries = new ArrayCollection();
+ $this->isActive = true;
+ $this->salt = md5(uniqid(null, true));
+ $this->entries = new ArrayCollection();
+ $this->tags = new ArrayCollection();
}
/**
return $this->entries;
}
+ /**
+ * @param Entry $entry
+ *
+ * @return User
+ */
+ public function addTag(Tag $tag)
+ {
+ $this->tags[] = $tag;
+
+ return $this;
+ }
+
+ /**
+ * @return ArrayCollection<Tag>
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
/**
* @inheritDoc
*/