本文整理汇总了PHP中Base_Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_Controller::__construct方法的具体用法?PHP Base_Controller::__construct怎么用?PHP Base_Controller::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base_Controller
的用法示例。
在下文中一共展示了Base_Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->helper->load('Exten');
$this->model->load('action_db');
$this->Load_Header();
}
示例2:
function __construct()
{
parent::__construct();
$this->load->database();
//载入前台模板
$this->load->set_front_theme('default');
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->submenu = Navigation::submenu('inventory');
// Registering unique category validator
Validator::register('cat_exists', function ($attribute, $value, $parameters) {
if ($value == 'null') {
return true;
}
$category = DB::table('categories')->where_id($value)->first();
if ($category !== null) {
return true;
}
});
// Registering unique item code validator
Validator::register('code_unique', function ($attribute, $value, $parameters = array()) {
$id = !empty($parameters) ? $parameters[0] : null;
$existing_item = DB::table('items')->where_code($value)->first('code');
if ($existing_item !== null) {
if ($id === null) {
return false;
}
$current_item = DB::table('items')->where_id($id)->first('code');
if ($current_item->code == $value) {
return true;
}
} elseif ($existing_item == null) {
return true;
}
});
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->load->language('welcome');
$this->template->title('Lex Parser Test');
$this->registry->set('nav', 'playground/lex');
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->filter('before', 'no_auth')->only(array('new', 'create'));
$this->filter('before', 'officer_only')->only(array('index', 'show'));
$this->filter('before', 'vendor_exists')->only(array('show'));
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->filter('before', 'project_exists');
$this->filter('before', 'i_am_collaborator');
$this->filter('before', 'deliverable_exists')->only(array('update', 'delete'));
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->load->helper('html_filters');
$this->template->set_partial('ckeditor', 'partials/ckeditor')->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'user-mode');
$this->registry->set('nav', 'playground');
}
示例8: redirect
function __construct()
{
parent::__construct();
if (!$this->session->userdata('logged_in')) {
redirect('/login');
}
}
示例9: __construct
/**
* Construct
*/
public function __construct()
{
parent::__construct();
$this->submenu = Navigation::submenu('inventory');
// Generating buttons
$this->item_buttons = Navigation::item_buttons()->add_item_button(array('icon' => 'icon-plus-sign', 'link' => 'contact@add', 'text' => __('site.add_contact')))->get_item_buttons();
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->load->helper('html_filters');
$this->template->append_metadata($this->load->view('partials/ckeditor', null, true))->set_partial('subnavbar', 'playground/online_editor/subnavbar')->set('subnavbar_item_active', 'admin-mode');
$this->registry->set('nav', 'playground');
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->vars = new config_vars();
$this->vars->load_vars();
$this->modulo = 'almacen';
$this->submodulo = 'historial_ajuste';
$this->seccion = 'ajustes';
$this->icon = 'fa fa-list';
//Icono de modulo
$this->path = $this->modulo . '/' . $this->submodulo . '/';
//almacen/entradas_recepcion/
$this->view_content = 'content';
$this->limit_max = 10;
$this->offset = 0;
// Tabs
$this->tab1 = 'agregar';
$this->tab2 = 'listado';
$this->tab3 = 'detalle';
// DB Model
$this->load->model($this->modulo . '/' . $this->seccion . '_model', 'db_model');
$this->load->model($this->modulo . '/catalogos_model', 'catalogos_model');
$this->load->model('stock_model', 'stock_model');
// Diccionario
$this->lang->load($this->modulo . '/' . $this->seccion, "es_ES");
// Tabs
$this->tab_inicial = 2;
$this->tab_indice = array($this->tab1, $this->tab2, $this->tab3);
for ($i = 0; $i <= count($this->tab_indice) - 1; $i++) {
$this->tab[$this->tab_indice[$i]] = $this->tab_indice[$i];
}
}
示例12: __construct
public function __construct()
{
parent::__construct();
error_reporting(-1);
ini_set('display_errors', 'On');
$this->load->library('Buscape_Loader', array('applicationId' => '757347736264524b6936303d'), 'buscape');
}
示例13: __construct
public function __construct()
{
parent::__construct();
$user_data = $this->session->userdata;
$this->load->vars($user_data);
$this->load->model('penetapan_model', 'data_model');
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->load->model('gallery_model', 'gallery_m');
$assets = array('css' => array(array('url' => 'bootstrap.min.css', 'order' => 0), array('url' => 'gallery.css', 'order' => 1), array('url' => 'portfolio.css', 'order' => 3), array('url' => 'style-shop.css', 'in_footer' => FALSE, 'order' => 2, 'is_cached' => FALSE), array('url' => 'style-layer-slider.css', 'in_footer' => TRUE, 'order' => 4)), 'js' => array(array('url' => 'jquery.min.js', 'order' => 0), array('url' => 'bootstrap.min.js', 'order' => 1), array('url' => 'mysite.js', 'order' => 3), array('url' => 'mysite1.js', 'order' => 2), array('url' => 'mysite2.js', 'in_footer' => FALSE, 'order' => 4)), 'style' => array(array('url' => 'mysite1.js')), 'script' => array(array('url' => 'mysite2.js')));
$this->theme->enQueueAssets($assets);
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->template->title('Assign Rating Example');
$this->template->set_partial('subnavbar', 'assign_rating_subnavbar')->set('subnavbar_item_active', 'v1');
$this->registry->set('nav', 'playground');
}