FUEL CMS User Guide : Version 1.4


Fuel Permissions Class

This class extends the Fuel_module class.

Properties Reference

Property Default Value Description
protected
module N/A
_perms N/A

Function Reference [+]

$this->fuel->permissions->initialize([$params=array()], ['$add'=TRUE])

Initialize the object and set object parameters. Accepts an associative array as input, containing object preferences.

Returns

void

Parameters

(array) $params Array of initalization parameters  (optional)

$this->fuel->permissions->exists('$perm')

Returns whether a permission exists or not.

Returns

boolean

Parameters

(string) $perm 

$this->fuel->permissions->list_all()

Returns all permissions.

Returns

array

$this->fuel->permissions->get('$perm_id', ['$return_type'=NULL])

Returns a permission.

Returns

string

Parameters

(mixed) $perm_id 
(string) $return_type 

$this->fuel->permissions->create([$name=array()], ['$description'=NULL])

Creates a permission.

Returns

boolean

Parameters

(string) $name The name of the permission
(array) $description The description of the permission

$this->fuel->permissions->create_simple_module_permissions('$module', [$types=array([0]=>create[1]=>edit[2]=>publish[3]=>delete)])

Creates permission(s) for a simple module.

Returns

array

Parameters

(string) $module The name of the module to create permissions
(array) $types An array of type of permissions to save with the module. If set to False then no extra permission types will be created

$this->fuel->permissions->delete_simple_module_permissions('$module', [$types=array([0]=>create[1]=>edit[2]=>publish[3]=>delete)])

Creates permission(s) for a simple module.

Returns

array

Parameters

(string) $module The name of the module to create permissions
(array) $types An array of type of permissions to save with the module. If set to False then no extra permission types will be created