本文整理汇总了PHP中Admin_Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin_Controller::__construct方法的具体用法?PHP Admin_Controller::__construct怎么用?PHP Admin_Controller::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin_Controller
的用法示例。
在下文中一共展示了Admin_Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->auth->restrict('Quotes.Content.View');
$this->load->model('quotes_model', null, true);
$this->load->model(array('uom/uom_model', 'product/product_model', 'vendor_profile/vendor_profile_model'));
$this->lang->load('quotes');
Assets::add_css('flick/jquery-ui-1.8.13.custom.css');
Assets::add_js('jquery-ui-1.8.13.min.js');
Template::set_block('sub_nav', 'content/_sub_nav');
Assets::add_module_js('quotes', 'quotes.js');
$uoms_select = $this->uom_model->get_uoms_select();
Template::set('uoms_select', $uoms_select);
$uoms = $this->uom_model->get_uoms();
Template::set('uoms', $uoms);
$products_select = $this->product_model->get_products_select();
Template::set('products_select', $products_select);
$products = $this->product_model->get_products();
Template::set('products', $products);
/*
$vendors_select = $this->vendors_model->get_vendors_select();
Template::set('vendors_select', $vendors_select);
$vendors = $this->vendors_model->get_vendors();
Template::set('vendors', $vendors);
*/
$vendors_select = $this->vendor_profile_model->get_vendors_select();
Template::set('vendors_select', $vendors_select);
$vendors = $this->vendor_profile_model->get_vendors();
Template::set('vendors', $vendors);
}
示例2: __construct
public function __construct()
{
parent::__construct();
$user_data = $this->session->userdata;
$this->load->vars($user_data);
$this->load->model('penyetoran_model', 'data_model');
}
示例3:
function __construct()
{
parent::__construct();
$this->auth->check_access('Admin', true);
$this->load->model('Page_model');
$this->lang->load('page');
}
示例4: __construct
/**
* Constructor method
* @access public
* @return void
*/
public function __construct()
{
// Call the parent's constructor
parent::__construct();
$this->load->model('permissions_m');
$this->load->helper('array');
$this->lang->load('permissions');
$this->load->library('form_validation');
// Validation rules
$this->validation_rules = array(array('field' => 'module', 'label' => lang('perm_module_label'), 'rules' => 'trim|required'), array('field' => 'controller', 'label' => lang('perm_controller_label'), 'rules' => 'trim|required'), array('field' => 'method', 'label' => lang('perm_method_label'), 'rules' => 'trim|required'), array('field' => 'role_type', 'label' => lang('perm_type_label'), 'rules' => 'trim|required'), array('field' => 'user_id', 'label' => lang('perm_user_label'), 'rules' => 'trim|numeric'), array('field' => 'permission_role_id', 'label' => lang('perm_role_label'), 'rules' => 'trim|numeric'));
// Get "roles" (like access levels)
$this->data->roles = $this->permissions_m->get_roles(array('except' => array('admin')));
$this->data->roles_select = array_for_select($this->data->roles, 'id', 'title');
$this->data->users = $this->users_m->get_all();
$this->data->users_select = array_for_select($this->data->users, 'id', 'full_name');
$modules = $this->modules_m->get_modules(array('is_backend' => true));
$this->data->modules_select = array('*' => lang('perm_module_select_default')) + array_for_select($modules, 'slug', 'name');
$this->template->append_metadata('
<script type="text/javascript">
var roleDeleteConfirm = "' . $this->lang->line('perm_role_delete_confirm') . '";
var permControllerSelectDefault = "' . $this->lang->line('perm_controller_select_default') . '";
var permMethodSelectDefault = "' . $this->lang->line('perm_method_select_default') . '";
</script>
');
$this->template->append_metadata(js('permissions.js', 'permissions'));
$this->template->set_partial('sidebar', 'admin/sidebar');
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->lang->load(array('download'));
$this->load->model(array('files/image_m'));
$this->load->helper(array('url'));
$download_dir = UPLOAD_PATH . 'download';
if (!is_dir($download_dir)) {
mkdir($download_dir, 0777);
}
$this->_download_base_file_dir = $download_dir;
$this->_download_base_file_cache_dir = $download_dir;
$this->_download_base_file_url = base_url($download_dir);
/*$_categories = array();
if ($categories = $this->gallery_categories_m->order_by('title')->get_all())
{
foreach ($categories as $category)
{
$_categories[$category->id] = $category->title;
}
}
$this->template
->set('categories', $_categories);*/
}
示例6:
function __construct()
{
parent::__construct();
$this->auth->check_access('Seller', true);
$this->lang->load('category');
$this->load->model('Category_model');
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->load->model('teacher_m');
$this->load->model('profile_m');
$this->load->model('admin_m');
}
示例8:
function __construct()
{
parent::__construct();
$this->load->model("module_m");
$language = $this->session->userdata('lang');
$this->lang->load('permissions', $language);
}
示例9: __construct
/**
* Constructor
*
* Requires needed models and helpers.
*
*/
public function __construct()
{
parent::__construct();
$this->load->helper('form');
$this->load->helper('cookie');
$this->load->dbutil();
}
示例10: strtolower
function __construct()
{
parent::__construct();
$this->module = strtolower(get_class());
$this->load->model('Mlienhe');
$this->load->library('session');
}
示例11:
function __construct()
{
parent::__construct();
$this->load->model(array('Customer_model', 'Location_model'));
$this->load->helper('formatting_helper');
$this->lang->load('customer');
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->load->model('variables_model');
$this->load->library('form_validation');
$this->data['js_lang']['are_you_sure_you_want_to_delete_this'] = lang('are_you_sure_you_want_to_delete_this');
$this->data['js_lang']['added_successfully'] = lang('added_successfully');
$this->data['js_lang']['edited_successfully'] = lang('edited_successfully');
$this->data['js_lang']['education_level'] = lang('education_level_lbl');
$this->data['js_lang']['id_type'] = lang('id_type_lbl');
$this->data['js_lang']['monthly_income'] = lang('monthly_income_lbl');
$this->data['js_lang']['nation'] = lang('nation_lbl');
$this->data['js_lang']['race'] = lang('race_lbl');
$this->data['js_lang']['payment_type'] = lang('payment_type');
$this->data['js_lang']['payment_item'] = lang('payment_item_lbl');
$this->data['js_lang']['payment_service'] = lang('payment_service');
$this->data['js_lang']['event_item'] = lang('event_item_lbl');
$this->data['js_lang']['country'] = lang('country');
$this->data['js_lang']['event_types'] = lang('event_types');
$this->data['js_lang']['kinship'] = lang('kinship');
$this->data['js_lang']['payment_terms'] = lang('payment_terms');
$this->data['js_lang']['payment_frequency_lbl'] = lang('payment_frequency_lbl');
$this->data['js_lang']['service_added_successfully'] = lang('service_added_successfully');
$this->data['js_lang']['field_added_successfully'] = lang('field_added_successfully');
$this->data['js_lang']['field_updated_successfully'] = lang('field_updated_successfully');
$this->append_javascript($this->data['theme_path'] . 'plugins/uploadifive/jquery.uploadifive_1.js');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/uploadifive/uploadifive.css');
if (!_can('Variables Management')) {
$this->_set_flashdata(lang('variables_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->load->model('download_m');
$this->load->model('download_type_m');
$this->load->library('pagination');
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->load->model('newsletter_m', 'newsletters');
$this->lang->load('newsletters');
$this->data = new stdClass();
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->user->restrict('Admin.Payments');
$this->load->model('Extensions_model');
$this->lang->load('payments');
}