public function __construct(User $user)
{
- $this->user = $user;
+ $this->user = $user;
$this->entries = new ArrayCollection();
}
$this->entries[] = $entry;
}
+ public function hasEntry($entry)
+ {
+ return $this->entries->contains($entry);
+ }
+
/**
* @return User
*/