Пример #1
0
 /**
  * @ApiDoc(
  *   description="Список вопросов с ответами"
  * )
  * @Rest\Get("/api/questions", name="faq_bundle.questions", defaults={"_format": "json"})
  * @Rest\View()
  */
 public function listQuestionsAction()
 {
     $categories = $this->repoFaqCategory->findAll();
     $questions = $this->repoFaqQuest->findAllWithAnswer();
     return ['categories' => $categories, 'questions' => $questions];
 }
Пример #2
0
 /**
  * @Rest\Get("/questions.json", name="faq_bundle.admin_questions",defaults={"_format": "json"})
  * @Rest\View()
  */
 public function listQuestionsAction()
 {
     $questions = $this->repoFaqQuest->findAll();
     return $questions;
 }