Elgg
Version 6.1
|
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 = [] | |
Entity capabilities service.
Definition at line 11 of file EntityCapabilitiesService.php.
Elgg\EntityCapabilitiesService::getTypesWithCapability | ( | string | $capability | ) |
Returns an array of type/subtypes with the requested capability enabled.
string | $capability | name of the capability to set |
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.
string | $type | type of the entity |
string | $subtype | subtype of the entity |
string | $capability | name of the capability to check |
bool | $default | default value to return if it is not explicitly set |
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.
string | $type | type of the entity |
string | $subtype | subtype of the entity |
string | $capability | name of the capability to set |
bool | $value | value to set |
Definition at line 44 of file EntityCapabilitiesService.php.
|
protected |
Definition at line 18 of file EntityCapabilitiesService.php.