<?php
/**
* Created by PhpStorm.
* User: User
* Date: 3/22/2019
* Time: 8:32 PM
*/
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class PartsController extends Controller
{
public function navContactAction()
{
$contact = $this->getDoctrine()->getRepository('AppBundle:Contact')->findBy(['isTop'=>true]);
return $this->render('parts/nav_contact.html.twig',[
'contact' => $contact
]);
}
public function navSocialAction()
{
$contact = $this->getDoctrine()->getRepository('AppBundle:Contact')->findBy(['isTop'=>true]);
return $this->render('parts/nav_social.html.twig',[
'contact' => $contact
]);
}
public function footerAction()
{
$subscribe = $this->getDoctrine()->getRepository('AppBundle:Page')->find(11);
$aboutInfo = $this->getDoctrine()->getRepository('AppBundle:Page')->find(1);
$dateYear = new \DateTime();
return $this->render(':parts:footer.html.twig',[
'subscribe' => $subscribe,
'about' => $aboutInfo,
'year' => $dateYear->format('Y'),
]);
}
public function cbaAction(Request $request){
$cba = $request->getSession()->get('cba');
return $this->render(':parts:currency.html.twig',[
'currency' => $cba
]);
}
}