FUEL CMS User Guide : Version 1.5.2


Fuel Permissions Model Class

Fuel_permissions_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
required
array('name', 'description')
The name and description value are required
unique_fields
array('name')
The name needs to be a unique value
belongs_to
array('users' => array
(
    [model] => array
        (
            [fuel] => fuel_users_model
        )

    [where] => array
        (
            [super_admin] => no
        )

)
)

Function Reference [+]

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

Lists the permission 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->permissions_model->tree()

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

User 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->permissions_model->on_after_post($values)

Model hook executed at the end of the post cycle (after saving). Used to avoid recursion of save.

Returns

array Returns the values that were saved

Parameters

(array) $values The values that were just saved

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)


Fuel Permission Model Class

This class extends the Data_record class.