<?php

namespace OfficeBrain\CustomBundle\CmsBundle\Manager\AbstractManager;

abstract class UploadArtworkCenterAbstract
{
	protected $cmsMediaLibraryManager;
	protected $imageLibraryManager;
	protected $commonLibraryManager;
    protected $entityManager;
    protected $serviceContainer;
    protected $request;
    protected $projectSetting;
    protected $paginatorManager;
    protected $recordsPerPage;
    protected $countries;
    protected $languages;
    protected $countryCode;
    protected $languageCode;
    protected $countryId;
    protected $languageId;

    public function __construct($serviceContainer)
    {
    	$this->serviceContainer = $serviceContainer;
        $this->entityManager = $serviceContainer->get('doctrine.orm.entity_manager');
        $this->uploadArtworkCenterRepo = $this->entityManager->getRepository('OfficeBrainCustomBundleCmsBundle:UploadArtworkCenter');
        $this->request = $this->serviceContainer->get('request');
        $this->paginatorManager = $this->serviceContainer->get('knp_paginator');        
    	$this->cmsMediaLibraryManager = $this->serviceContainer->get('office_brain_cms_media_library_manager');        
    	$this->imageLibraryManager = $this->serviceContainer->get('office_brain_cms_media_library_manager');        
    	$this->commonLibraryManager = $this->serviceContainer->get('office_brain_common_library');  
		$this->emailService = $this->serviceContainer->get('office_brain_email_service');
    	
    	$this->mediaFilePath = $this->serviceContainer->getParameter('cms.media_file_path');
    	$this->base_url = $this->serviceContainer->getParameter('base_url');
    	$this->uploadArtworkCenterFileUrl = $this->serviceContainer->getParameter('upload_artwork_center.file_url');
    	$this->uploadArtworkCenterFilePath = $this->serviceContainer->getParameter('upload_artwork_center.file_path');
    	
        $this->projectSetting = $this->request->get('project_setting');
        $this->projectUserSetting = $this->request->get('project_user_setting');
        $this->recordsPerPage = $this->projectSetting['configuration_rule']['site_management']['option']['cms']['option']['cms_page_record_per_page']['status'];
        $this->cultureId = $this->projectSetting['culture_id'];
        $this->localeLanguage = $this->projectSetting['locale_language'];
        
       	if (count(explode('_', $this->localeLanguage)) == 1) {
       		$this->localeLanguage = $this->projectSetting['culture_code'];
       	}

        if ($this->request->get('instance_id') > 0) {
            $this->projectSetting['instance_id'] = $this->request->get('instance_id');
        }
        $this->cmsUploadArtworkCenterRepository = $this->entityManager->getRepository('OfficeBrainCustomBundleCmsBundle:UploadArtworkCenter');

        $this->cmsUploadArtworkCenterRepository->setProjectSetting($this->projectSetting);
        
    }

    public function __destruct()
    {
        unset($this->entityManager);
        unset($this->request);
        unset($this->projectSetting);
        unset($this->countries);
        unset($this->languages);
        unset($this->cmsUploadArtworkCenterRepository);
        unset($this->cmsPageLanguageRepository);
        unset($this->countryId);
        unset($this->languageId);
        unset($this->countryCode);
        unset($this->languageCode);
    }
    
    /**
     * @author Employee Id: 5460
     *
     * Description : This function is used to get list of all upload artwork center
     *
     * @param : $file object
     *
     * @return boolean
     *
     * @throws Exception : Null
     *
     **/
    public function getCmsUploadArtworkCenterList()
    {
    }
    
    /**
     * @author Employee Id: 5460
     *
     * Description : This function is used to get list of all upload artwork center
     *
     * @param : $file object
     *
     * @return boolean
     *
     * @throws Exception : Null
     *
     **/
    public function searchCmsUploadArtworkCenter()
    {
    }

    /**
     * @author Employee Id: 5460
     *
     * Description : This function is used to get detali of upload artwork center using id
     *
     * @param : $file object
     *
     * @return boolean
     *
     * @throws Exception : Null
     *
     **/
	public function getCmsUploadArtworkCenterDetail($id)
	{			
	}			
}
