Elgg  Version 6.0
Public Member Functions | Protected Attributes | List of all members
Elgg\EntityCapabilitiesService Class Reference

Entity capabilities service. More...

Public Member Functions

 hasCapability (string $type, string $subtype, string $capability, bool $default=false)
 Checks if a capability is enabled for a specified type/subtype. More...
 
 setCapability (string $type, string $subtype, string $capability, bool $value)
 Sets the capability value for a specified type/subtype. More...
 
 getTypesWithCapability (string $capability)
 Returns an array of type/subtypes with the requested capability enabled. More...
 

Protected Attributes

 $entities = []
 

Detailed Description

Entity capabilities service.

Definition at line 11 of file EntityCapabilitiesService.php.

Member Function Documentation

Elgg\EntityCapabilitiesService::getTypesWithCapability ( string  $capability)

Returns an array of type/subtypes with the requested capability enabled.

Parameters
string$capabilityname of the capability to set
Returns
array

Definition at line 63 of file EntityCapabilitiesService.php.

Elgg\EntityCapabilitiesService::hasCapability ( string  $type,
string  $subtype,
string  $capability,
bool  $default = false 
)

Checks if a capability is enabled for a specified type/subtype.

Parameters
string$typetype of the entity
string$subtypesubtype of the entity
string$capabilityname of the capability to check
bool$defaultdefault value to return if it is not explicitly set
Returns
bool

Definition at line 30 of file EntityCapabilitiesService.php.

Elgg\EntityCapabilitiesService::setCapability ( string  $type,
string  $subtype,
string  $capability,
bool  $value 
)

Sets the capability value for a specified type/subtype.

Parameters
string$typetype of the entity
string$subtypesubtype of the entity
string$capabilityname of the capability to set
bool$valuevalue to set
Returns
void

Definition at line 44 of file EntityCapabilitiesService.php.

Member Data Documentation

Elgg\EntityCapabilitiesService::$entities = []
protected

Definition at line 18 of file EntityCapabilitiesService.php.


The documentation for this class was generated from the following file: