/** * {@inheritdoc} */ public function findOneBy(array $criteria) { try { return $this->unstableRepository->findOneBy($criteria); } catch (\Exception $exception) { return $this->fallbackRepository->findOneBy($criteria); } }
/** * @Transform :theme * @Transform /^"([^"]+)" theme$/ * @Transform /^theme "([^"]+)"$/ */ public function getThemeByThemeTitle($themeTitle) { return $this->themeRepository->findOneBy(['title' => $themeTitle]); }