Themes::__construct PHP Méthode

__construct() public méthode

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        $this->load->model('Themes_model');
        $this->load->model('Settings_model');
        $this->load->model('Image_tool_model');
        $this->load->helper('template');
        $this->lang->load('themes');
    }

Usage Example

Exemple #1
0
        public function __construct()
        {
            parent::__construct();
            $this->path = osc_themes_path();

            if( Params::getParam('theme') != '' && Session::newInstance()->_get('adminId') != '' ) {
                $this->setCurrentTheme( Params::getParam('theme') );
            } else {
                $this->setCurrentTheme( osc_theme() );
            }

            $functions_path = $this->getCurrentThemePath() . 'functions.php';
            if( file_exists($functions_path) ) {
                require_once $functions_path;
            }

            $info = $this->loadThemeInfo($this->theme);
            if($info['template'] != '' ) {
				//$this->setCurrentTheme($info['template']);
				$parent_functions_path = osc_base_path() . 'oc-content/themes/' . $info['template'] . '/functions.php';
				if( file_exists($parent_functions_path) ) {
					require_once $parent_functions_path;
				}
			}
        }
All Usage Examples Of Themes::__construct