query = $query; } public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->orderBy('position'); return $query; } public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->filterByMerchant($this->merchant); return $query; } public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function getOneDefault($query = null) { $query = $this->createDefaultQuery($query); $query->filterByIsDefault(true); return $query->findOne(); } // getSection public function getOneByDevAlias(string $devAlias, bool $isOnline = true, $query = null): ?SectionInterface { $section = parent::getOneByDevAlias($devAlias, $isOnline, $query); if (!$section) { throw new NotFoundHttpException('La section ' . $devAlias . ' est introuvable'); } return $section; } public function countOpenDays(SectionInterface $section, $query = null): int { // @TODO : à implémenter avec le nouveau système d'ouverture des commandes } }