* * @method Page|null find($id, $lockMode = null, $lockVersion = null) * @method Page|null findOneBy(array $criteria, array $orderBy = null) * @method Page|null findOneBySlug(string $slug) * @method Page[] findAll() * @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ final class PageRepository extends ServiceEntityRepository { private const ENTITY_CLASS = Page::class; public function __construct(ManagerRegistry $registry) { parent::__construct($registry, self::ENTITY_CLASS); } public function getHome(): ?Page { return $this->findOneBy(['home' => true]); } }