76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
|
|
|
/**
|
|
* AMS
|
|
*
|
|
* @package HMVC
|
|
* @author Venba
|
|
* @copyright 2022 Venba
|
|
* @license https://venbainfotech.com/licenses/MIT MIT License
|
|
* @link <URI> (description)
|
|
* @version GIT: $Id$
|
|
* @since Version 0.0.1
|
|
* @filesource
|
|
*
|
|
*/
|
|
|
|
class Backend_Controller extends MY_Controller
|
|
{
|
|
//
|
|
public $CI;
|
|
|
|
/**
|
|
* An array of variables to be passed through to the
|
|
* view, layout, ....
|
|
*/
|
|
protected $data = array();
|
|
|
|
/**
|
|
* [__construct description]
|
|
*
|
|
* @method __construct
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// To inherit directly the attributes of the parent class.
|
|
parent::__construct();
|
|
|
|
|
|
// CI profiler
|
|
$this->output->enable_profiler(true);
|
|
|
|
// // This function returns the main CodeIgniter object.
|
|
// // Normally, to call any of the available CodeIgniter object or pre defined library classes then you need to declare.
|
|
// $CI =& get_instance();
|
|
|
|
// //Example data
|
|
// // Site name
|
|
// $this->data['sitename'] = 'CodeIgniter-HMVC';
|
|
|
|
// //Example data
|
|
// // Browser tab
|
|
// $this->data['site_title'] = ucfirst('Admin Dashboard');
|
|
}
|
|
|
|
/**
|
|
* [render_page description]
|
|
*
|
|
* @method render_page
|
|
*
|
|
* @param [type] $view [description]
|
|
* @param [type] $data [description]
|
|
*
|
|
* @return [type] [description]
|
|
*/
|
|
protected function render_page($view, $data)
|
|
{
|
|
|
|
$this->load->view('templates/header', $this->data);
|
|
$this->load->view('templates/main_header', $this->data);
|
|
$this->load->view('templates/main_sidebar', $this->data);
|
|
$this->load->view($view, $this->data);
|
|
$this->load->view('templates/footer', $this->data);
|
|
$this->load->view('templates/control_sidebar', $this->data);
|
|
}
|
|
}
|