<?php
namespace OfficeBrain\CustomBundle\CmsBundle\Manager\AbstractManager;

use OfficeBrain\CustomBundle\CmsBundle\Form\CreditApplicationFormType;
use OfficeBrain\CustomBundle\CmsBundle\Entity\CreditApplicationForm;



/**
 * @author OfficeBrain 4571 <info@officebrain.com>
 *
 * Description : This is the abstract class which contains all the methods of its extended class.
 *
 **/
abstract class CreditApplicationFormAbstract
{
	protected $container;
	protected $entityManager;
	protected $request;
	protected $translator;
	protected $formFactory;
    protected $projectSettings;
    protected $paginatorManager;
    protected $recordsPerPage;
    protected $instanceId;
    protected $responseArray;
    
    /**
     * @author Employee Id: 4571
     *
     * Description : This function is used to set member variables default value
     * @return: NULL
     *
     * @throws Exception: Null
     */
    public function __construct($container,$entityManager, $request, $translator, $formFactory, $paginatorManager)
    {
        $this->entityManager = $entityManager;
        $this->request = $request;
        $this->container = $container;
        $this->projectSettings = $this->request->get('project_setting');   
        $this->paginatorManager = $paginatorManager;
        $this->recordsPerPage = $this->projectSettings['configuration_rule']['site_management']['option']['cms']['option']['cms_page_record_per_page']['status'];
        $this->creditApplicationFormRepository = $this->entityManager->getRepository('OfficeBrainCustomBundleCmsBundle:CreditApplicationForm');
        //$this->creditApplicationFormRepository->setProjectSetting($this->projectSettings);        
        $this->responseArray = null;               
        $this->translator = $translator;
        $this->formFactory = $formFactory;
        $this->instanceId = $this->projectSettings['instance_id'];
        $this->languageId = $this->projectSettings['culture_id'];
        $this->coreManager =  $this->container->get('office_brain_core_manager');
    }
    
   /**
    * @author Employee Id: 4571
    *
    * Description : This function is used to unset member variables
    *
    * @param : None
    *
    * @return NULL
    *
    * @throws Exception: Null
    */
    public function __destruct()
    {
    	unset($this->container);
        unset($this->entityManager);
        unset($this->request);
        unset($this->translator);
        unset($this->formFactory);
        unset($this->projectSettings);
        unset($this->paginatorManager);
        unset($this->recordsPerPage);
        unset($this->instanceId);
        unset($this->responseArray);
    }
    
    public function saveFormData()
    {	
    }
}
