query = $query; } // getSection public function getOneByDevAlias(string $devAlias): ?SectionInterface { $query = $this->query->create(); $query ->filterByMerchant($this->merchant) ->filterByDevAlias($devAlias); $section = $query->findOne(); if (!$section) { throw new NotFoundHttpException('La section ' . $devAlias . ' est introuvable'); } return $section; } }