src/Controller/FaqController.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Helper as appHelper;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. class FaqController extends FrontendController
  7. {
  8.     /**
  9.      * @Route("/faqs", name="app_faq_listing")
  10.      */
  11.     public function indexAction(Request $request)
  12.     {
  13.         $faqs = [];
  14.         try {
  15.             $template 'Faq/index.html.twig';
  16.             $listing = new \Pimcore\Model\DataObject\Faq\Listing();
  17.             $listing->setOrder('ASC');
  18.             $listing->setOrderKey('o_id');
  19.             $faqs $listing->load();
  20.         } catch (\Exception $ex) {
  21.             appHelper\Log::log($ex'app_blog_listing');
  22.             $template 'Error/error.html.twig';
  23.         }
  24.         return $this->render($template, ['faqs'=>$faqs]);
  25.     }
  26. }