<?php
namespace App\Controller;
use App\Helper as appHelper;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
class FaqController extends FrontendController
{
/**
* @Route("/faqs", name="app_faq_listing")
*/
public function indexAction(Request $request)
{
$faqs = [];
try {
$template = 'Faq/index.html.twig';
$listing = new \Pimcore\Model\DataObject\Faq\Listing();
$listing->setOrder('ASC');
$listing->setOrderKey('o_id');
$faqs = $listing->load();
} catch (\Exception $ex) {
appHelper\Log::log($ex, 'app_blog_listing');
$template = 'Error/error.html.twig';
}
return $this->render($template, ['faqs'=>$faqs]);
}
}