|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
|
|
+use AppBundle\AppBundle;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
|
|
@@ -520,4 +521,22 @@ class User implements AdvancedUserInterface
|
|
|
) = unserialize($serialized, array('allowed_classes' => false));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param \AppBundle\Entity\Film $film
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ public function wantToSee(Film $film)
|
|
|
+ {
|
|
|
+ return $this->getFilms()->contains($film);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param \AppBundle\Entity\Film $film
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ public function haveSeen(Film $film)
|
|
|
+ {
|
|
|
+ return $this->getFilmsVus()->contains($film);
|
|
|
+ }
|
|
|
+
|
|
|
}
|