FUEL CMS User Guide : Version 1.5.2


Fuel Sitevariables Model Class

Fuel_sitevariables_model is used for managing site-wide variables.

This class extends the Base_module_model class.

Properties Reference

Property Default Value Description
public
required
array('name')
The Name field is required
unique_fields
array('name')
The Name should be unique

Function Reference [+]

$this->fuel->sitevariables_model->list_items(['$limit'=NULL], ['$offset'=NULL], ['$col'='name'], ['$order'='desc'], ['$just_count'=FALSE])

Lists the site variable items.

Returns

mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)

Parameters

(int) $limit The limit value for the list data (optional)
(int) $offset The offset value for the list data (optional)
(string) $col The field name to order by (optional)
(string) $order The sorting order (optional)
(boolean) $just_count Determines whether the result is just an integer of the number of records or an array of data (optional)

$this->fuel->sitevariables_model->retrieve_all()

Lists the module items.

Returns

Key/value option list with the names of the variables and the values as the value

$this->fuel->sitevariables_model->retrieve_one(['$name'=NULL])

Returns a single value based on the site variable name.

Returns

string

$this->fuel->sitevariables_model->form_fields([$values=array()], [$related=array()])

Site variable form fields array.

Returns

array An array to be used with the Form_builder class

Parameters

(array) $values Values of the form fields (optional)
(array) $related An array of related fields. This has been deprecated in favor of using has_many and belongs to relationships (deprecated)


Fuel Sitevariable Model Class

This class extends the Base_module_record class.