<?php

namespace OfficeBrain\Bundle\GreenBookBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Response;

/**
 * @author OfficeBrain 4835 <info@officebrain.com>
 * @Route("/admin/{_locale}/greenbook")
 */
class GreenBookAdminController extends Controller
{
    private $request;
    private $translator;
    private $session;
    private $greenBookManager;
    private $language;
    private $country;
    private $projectSetting;
    private $responseArray;
    private $isAjaxRequest;
    
    public function __construct()
    {
        $this->request = null;
        $this->translator = null;
        $this->session = null;
        $this->greenBookManager = null;
        $this->language = null;
        $this->country = null;
        $this->projectSetting = null;
        $this->responseArray = array();
        $this->isAjaxRequest = null;
    
    }

    public function __destruct()
    {
        unset($this->request);
        unset($this->translator);
        unset($this->session);
        unset($this->greenBookManager);
        unset($this->language);
        unset($this->country);
        unset($this->projectSetting);
        unset($this->responseArray);
        unset($this->isAjaxRequest);
    }
    
    public function initAction()
    {
        $this->request = $this->getRequest();
        $this->translator = $this->get('translator');
        $this->session = $this->get('session');
        $this->greenBookManager = $this->container->get('office_brain_greenbook_manager');
        $this->language = $this->container->getParameter('language');
        $this->country = $this->container->getParameter('country');
        $this->projectSetting = $this->request->get('project_setting');
        $this->responseArray = array();
        $this->isAjaxRequest = $this->request->isXmlHttpRequest();
    }
    
    
    
    /**
     * @author Employee Id: 4835
     * Description :render form for coupon add.
     *
     * @param null
     *
     * @Route("/coupon/add", name="office_brain_greenbookbundle_greenbookadmin_coupon_add")
     *
     * @Method("GET")
     *
     * @return data
     *
     * @throws Exception : Null
     *
     * @Template("OfficeBrainGreenBookBundle:Admin:add.html.twig")
     * */
    public function addAction()
    {
        return array(
                // ...
            );    }

}
