/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * Also will set the values in the parameters array as properties of this object * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); $this->normalize_files_array(); $this->dir_filetypes = $this->CI->fuel->config('editable_asset_filetypes'); $this->_dirs = list_directories($this->CI->asset->assets_server_path(), $this->CI->fuel->config('assets_excluded_dirs'), FALSE, TRUE); }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); // need this here instead of the constructor, because this gets executed by // the parent Fuel_base_library before the rest of the constructor' if ($this->has_lang()) { $lang = defined('FUEL_ADMIN') ? $this->fuel->auth->user_lang() : NULL; $this->load_language($this->name, $lang); } $this->load_config(); }
public function initialize($params) { parent::initialize($params); if (empty($this->location)) { $this->location = uri_path(); } $default_home = $this->fuel->config('default_home_view'); if (empty($this->location) or $this->location == 'page_router') { $this->location = $default_home; } }
public function initialize($params = array()) { parent::initialize($params); if (empty($this->location)) { $this->location = uri_path(); } $default_home = $this->fuel->config('default_home_view'); if (empty($this->location) or $this->location == $this->CI->router->routes['404_override']) { $this->location = $default_home; } }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); // set the cache path to the configs cache path if left empty if (empty($this->cache_path)) { $this->set_cache_path($this->CI->config->item('cache_path')); } // set the compile templates path if (empty($this->compiled_path)) { $this->set_compiled_path($this->fuel->parser->get_compiled_dir()); } }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); // set the cache path to the configs cache path if left empty if (empty($this->cache_path)) { $this->set_cache_path($this->CI->config->item('cache_path')); } // set the compile templates path if (empty($this->compiled_path)) { include APPPATH . 'config/parser.php'; $this->set_compiled_path($config['parser_compile_dir']); } }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { // first set the default to the values in the FUEL config $_fuel_config = array('query_str_param', 'cookie_name', 'cookie_exp', 'use_cookies', 'detect_user_agent', 'default_option', 'domains'); foreach ($_fuel_config as $p) { $config = $this->fuel->config('language_' . $p); if (!is_null($config)) { $this->{$p} = $config; } } parent::initialize($params); $this->options = $this->fuel->config('languages'); $this->selected = $this->CI->config->item('language'); }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); }
/** * Initialize the object. * * Accepts an associative array as input, containing preferences. * Also will set the values in the config as properties of this object * * @access public * @param array config preferences * @return void */ public function initialize($params = array()) { parent::initialize($params); $this->CI->load->library('validator'); // need to reset the validation object upon initialization since we are simply sharing the same one from $CI->validator $validator =& $this->get_validator(); $validator->reset(); }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); $this->fuel->load_model('fuel_logs'); }
/** * Initialize the FUEL admin object * * Accepts an associative array as input for setting properties * * @access public * @param array Config preferences (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); // now load the other languages $this->load_languages(); // load assets config $this->CI->config->load('asset'); // load fuel helper $this->CI->load->module_helper(FUEL_FOLDER, 'fuel'); // check if the admin is even accessible... this method looks at if the admin is enabled and at any remote host or IP restrictions if (!$this->fuel->auth->can_access() and $this->validate) { show_404(); } // set asset output settings $this->CI->asset->assets_output = $this->fuel->config('fuel_assets_output'); if ($this->validate) { $this->check_login(); } // set variables $load_vars = array('js' => array(), 'css' => $this->load_css(), 'js_controller_params' => array(), 'keyboard_shortcuts' => $this->fuel->config('keyboard_shortcuts'), 'nav' => $this->nav(), 'modules_allowed' => $this->fuel->config('modules_allowed'), 'page_title' => $this->page_title(), 'form_action' => $this->CI->uri->uri_string()); if ($this->validate) { $load_vars['user'] = $this->fuel->auth->user_data(); $load_vars['session_key'] = $this->fuel->auth->get_session_namespace(); } $this->CI->js_controller_path = js_path('', FUEL_FOLDER); $this->CI->load->vars($load_vars); $this->load_js_localized(); // set asset paths $this->CI->asset->assets_folders = array('images' => 'images/', 'css' => 'css/', 'js' => 'js/', 'pdf' => 'pdf/', 'media' => 'media/', 'swf' => 'swf/', 'docs' => 'docs/'); $this->CI->asset->assets_path = 'assets/'; $this->main_layout = $this->fuel->config('main_layout'); $this->set_inline($this->CI->input->get('inline')); // set last page $this->last_page = $this->fuel->auth->user_data('fuel_last_page'); $this->init_display_modes(); }