Fuel Pages Model Class
Fuel_pages_model is used for managing FUEL users in the CMS.
This class extends the Base_module_model class.
Properties Reference
Property | Default Value | Description |
---|---|---|
public | ||
filter_join | and | |
required |
array('location') |
The location field is required |
unique_fields |
array('location') |
The location field is unique |
hidden_fields |
array('last_modified', 'last_modified_by') |
The Last modified and Last modified by are hidden fields |
ignore_replacement |
array('location') |
The location value will be ignored upon replacement |
limit_to_user_field | none | A user ID field in your model that can be used to limit records based on the logged in user |
Function Reference [+]
$this->fuel->pages_model->related_items([$values=array()])
Displays related items on the right side.
Returns
mixed Can be an array of items or a string value
Parameters
(array) $values View variable data (optional)
$this->fuel->pages_model->tree(['$just_published'=FALSE])
Tree view that puts pages in a hierarchy based on their location value.
Returns
array An array that can be used by the Menu class to create a hierachical structure
Parameters
(boolean) $just_published Determines whether to return just published pages or not (optional... and ignored in the admin)
$this->fuel->pages_model->list_locations(['$include_unpublished'=FALSE])
Returns a key/value array list of the page locations.
Returns
array
Parameters
(boolean) $include_unpublished Determines whether to included unpublished or not (optional)
$this->fuel->pages_model->find_by_location('$location', ['$just_published'='yes'])
Returns an array of page information based on the location.
Returns
array
Parameters
(string) $location The location of the page (boolean) $just_published Determines whether to included unpublished or not (optional)
$this->fuel->pages_model->children('$root')
Returns all the children pages basd on the location URI.
Returns
void
Parameters
(string) $root URI path to start from (e.g. about would find about/history, about/contact, etc)
$this->fuel->pages_model->form_fields([$values=array()], [$related=array()])
Page form fields.
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)
$this->fuel->pages_model->on_before_clean($values)
Model hook right before the data is cleaned.
Returns
array Returns the values to be cleaned
Parameters
(array) $values The values to be saved right the clean method is run
$this->fuel->pages_model->on_before_validate($values)
Model hook executed right before validation is run.
Returns
array Returns the values to be validated right before saving
Parameters
(array) $values The values to be saved right before validation
$this->fuel->pages_model->on_before_save($values)
Model hook executed right before saving.
Returns
array Returns the values to be saved
Parameters
(array) $values The values to be saved right before saving
$this->fuel->pages_model->on_before_delete('$where')
Model hook executed right before deleting.
Returns
void
Parameters
(mixed) $where The where condition to be applied to the delete (e.g. array('user_name' => 'darth'))
$this->fuel->pages_model->on_after_delete('$where')
Model hook executed right after deleting.
Returns
void
Parameters
(mixed) $where The where condition to be applied to the delete (e.g. array('user_name' => 'darth'))
$this->fuel->pages_model->restore('$ref_id', ['$version'=NULL])
Overwrites parent method. Used to restore page data from the archive.
Returns
boolean
Parameters
(int) $ref_id The record ID associated with the archive (int) $version The version of the archive to retrieve (optional)
$this->fuel->pages_model->replace('$replace_id', '$id', ['$delete'=TRUE])
Overwrite parent method to replace variable data as well.
Returns
boolean Whether it was saved properly or not
Parameters
(int) $replace_id The old record id of data that will be replaced (int) $id The new record id of data that will be used for the replacement (boolean) $delete Determines whether to delete the old record (optional)
$this->fuel->pages_model->_common_query(['$params'=NULL])
Common query that joins user created/modified information to the page.
Returns
void
Parameters
(mixed) $params parameter to pass to common query (optional)
Fuel Page Model Class
This class extends the Base_module_record class.