Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Rules

Fonctions membres publiques

 __construct ($input='')
 
 getData ()
 
 mergeCollection ($input)
 
 merge ($actions)
 
 mergeAction ($action, $identities)
 
 allow ($action, $identity)
 
 getAllowed ($identity)
 
 __toString ()
 

Attributs protégés

 $data = array()
 

Description détaillée

Access rules class.

Depuis
2.5.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $input = '')

Constructor.

The input array must be in the form: array('action' => array(-42 => true, 3 => true, 4 => false)) or an equivalent JSON encoded string, or an object where properties are arrays.

Paramètres
mixed$inputA JSON format string (probably from the database) or a nested array.
Depuis
1.7.0

Références $action, Access\$identities, $input, et elseif.

Documentation des fonctions membres

◆ __toString()

__toString ( )

Magic method to convert the object to JSON string representation.

Renvoie
string JSON representation of the actions array
Depuis
1.7.0

Références $data, $name, et json_encode.

◆ allow()

allow (   $action,
  $identity 
)

Checks that an action can be performed by an identity.

The identity is an integer where +ve represents a user group, and -ve represents a user.

Paramètres
string$actionThe name of the action.
mixed$identityAn integer representing the identity, or an array of identities
Renvoie
mixed Object or null if there is no information about the action.
Depuis
1.7.0

Références $action.

◆ getAllowed()

getAllowed (   $identity)

Get the allowed actions for an identity.

Paramètres
mixed$identityAn integer representing the identity or an array of identities
Renvoie
Allowed actions for the identity or identities
Depuis
1.7.0

Références $action, et $name.

◆ getData()

getData ( )

Get the data for the action.

Renvoie
array A named array of Rule objects.
Depuis
1.7.0

Références $data.

◆ merge()

merge (   $actions)

Method to merge actions with this object.

Paramètres
mixed$actionsRule object, an array of actions or a JSON string array of actions.
Renvoie
void
Depuis
1.7.0

Références $action, $data, Access\$identities, $name, et elseif.

◆ mergeAction()

mergeAction (   $action,
  $identities 
)

Merges an array of identities for an action.

Paramètres
string$actionThe name of the action.
array$identitiesAn array of identities
Renvoie
void
Depuis
1.7.0

Références $action, et Access\$identities.

◆ mergeCollection()

mergeCollection (   $input)

Method to merge a collection of Rules.

Paramètres
mixed$inputRule or array of Rules
Renvoie
void
Depuis
1.7.0

Références $input.

Référencé par Access\getAssetRules().

Documentation des champs

◆ $data

$data = array()
protected

La documentation de cette classe a été générée à partir du fichier suivant :