Fuel Modules Class
This class extends the Fuel_base_library class.
Properties Reference
Property | Default Value | Description |
---|---|---|
protected | ||
_modules | N/A | |
_advanced | N/A | |
_inited | N/A | |
_module_init | N/A | |
_modules_grouped | N/A | |
_overwrites | N/A |
Function Reference [+]
$this->fuel->modules->initialize([$params=array()], ['$add'=TRUE])
Initialize the object and set module initialization parameters. Accepts an associative array as input, containing module initialization preferences.
Returns
void
Parameters
(array) $params Array of additional module initialiation parameters (optional)
$this->fuel->modules->get_all_module_configs()
$this->fuel->modules->get_module_config('$module')
Returns an advanced module's simple module config information (sounds strange I know).
Returns
array
Parameters
(string) $module Advanced module folder name
$this->fuel->modules->add('$mod', $init)
Add a module.
Returns
void
Parameters
(string) $mod Module name (array) $init Module initialization parameters
$this->fuel->modules->get(['$module'=NULL], ['$include_advanced'=TRUE])
Returns a module object with the specified key name. If no module parameter is passed, then an array of all simple modules will be returned.
Returns
object Fuel_module object
Parameters
(string) $module Module name (optional) (boolean) $include_advanced Whether to include advanced modules in the search. Defeault is TRUE. (optional)
$this->fuel->modules->overwrites()
Module overwrites. Used to overwrite existing module configurations (e.g. pages, blocks, etc).
Returns
string
$this->fuel->modules->pages(['$include_pages_module'=FALSE])
Returns an array of all the pages.
Returns
array
$this->fuel->modules->exists('$module', ['$include_advanced'=TRUE])
Determine whether a module exists or not.
Returns
boolean
Parameters
(string) $module Module name (boolean) $include_advanced Whether to include advanced modules in the search
$this->fuel->modules->is_advanced('$module')
Returns whether a module is advanced or not.
Returns
boolean
Parameters
(string) $module Module name
$this->fuel->modules->advanced(['$include_fuel'=FALSE])
Returns an array of all the advanced module objects.
Returns
array An array of Fuel_advanced_module objects
Parameters
(boolean) $include_fuel Determines whether to include the "fuel" module with the return value
$this->fuel->modules->allowed('$module')
Determine whether a module is allowed in the MY_config.
Returns
boolean
Parameters
(string) $module Module name
$this->fuel->modules->module_init([$module=array()])
Returns the initialization parameters for a module if the module parameter is passed. No parameter passed then all initialization parameters are returned.
Returns
array
Parameters
(string) $module Module name
$this->fuel->modules->module_grouped_init([$adv_module=array()])
Returns the initialization parameters for a module if the module parameter is passed. No parameter passed then all initialization parameters are returned.
Returns
array
Parameters
(string) $adv_module Module name
$this->fuel->modules->install('$module')
Installs a module.
Returns
boolean
Parameters
(string) $module Module name
$this->fuel->modules->uninstall('$module')
Uninstalls a module.
Returns
boolean
Parameters
(string) $module Module name
$this->fuel->modules->options_list(['$advanced'=FALSE])
Options list for simple modules.
Returns
array
Fuel Module Class
Can be retrieved by $this->fuel->modules->get('{module_name}').
This class extends the Fuel_base_library class.
Properties Reference
Property | Default Value | Description |
---|---|---|
protected | ||
module | N/A | |
_init | N/A | |
_info | N/A |
Function Reference [+]
$module->initialize([$params=array()], [$init=array()])
Initialize the user preferences. Accepts an associative array as input, containing display preferences as well as an array for simple module configuration parameters.
Returns
void
Parameters
(array) $params config preferences (optional) (array) $init simple module initialization parameters (optional)
$module->name()
Returns the name of the module.
Returns
string
$module->info(['$prop'=NULL])
Retrieve the info for a module.
Returns
array
Parameters
(string) $prop module name (optional)
$module->set_info('$key', '$prop')
Sets a simple module's property.
Returns
array
$module->pages()
Get the pages of a module.
Returns
array
$module->url([$data=array()])
Returns the url based on the preview_path configuration of the simple module.
Returns
string
Parameters
(array) $data data to be merged in with perview path URL
$module->module_path()
The server path to a module.
Returns
string
$module->model()
Returns the model of the module.
Returns
string
$module->find([$params=array()], ['$where'=NULL])
Loads a module model and creates a variable in the view that you can use to merge data.
Returns
string
Parameters
(mixed) $params A string value of "all", "one", "key", "find" or "by" OR A key value array of options which include "find", "select", "where", "order", "limit", "offset", "return_method", "assoc_key", "var", "module", and "params"(optional) (mixed) $where Where condition (since it's most common parameter) (optional)
$module->save('$values')
An alias to the modules model to save.
Returns
boolean
Parameters
(arrray) $values An array of values to save to the module's model
$module->create([$values=array()])
An alias to the module's model t create a new record.
Returns
object Record_class object
Parameters
(arrray) $values An array of values to save to the module's model (optional)
$module->delete($where)
An alias to the module's model t delete a record.
Returns
boolean
Parameters
(array) $where Where condition to use for deleting record
$module->__call('$name', $args)
Magic method to find records on the module's model.
Returns
array
Parameters
(string) $name Method name (array) $args Method arguments
$module->__get('$var')
Magic method to get value of a module property.
Returns
array
Parameters
(string) $var Module property