protected function FlagTypeBase::hasExtraPermission in Flag 8.4
Determines whether the flag is set to have the extra permissions set.
Parameters
string $option: The name of an extra permissions set. These are defined in getExtraPermissionsOptions().
Return value
bool TRUE if the flag is configured to have the permissions, FALSE if not.
3 calls to FlagTypeBase::hasExtraPermission()
- EntityFlagType::actionAccess in src/
Plugin/ Flag/ EntityFlagType.php - Checks whether a user has permission to flag/unflag or not.
- EntityFlagType::actionPermissions in src/
Plugin/ Flag/ EntityFlagType.php - Returns the permissions available to this flag type.
- UserFlagType::actionAccess in src/
Plugin/ Flag/ UserFlagType.php - Checks whether a user has permission to flag/unflag or not.
File
- src/
FlagType/ FlagTypeBase.php, line 148
Class
- FlagTypeBase
- Provides a base class for flag type plugins.
Namespace
Drupal\flag\FlagTypeCode
protected function hasExtraPermission($option) {
return in_array($option, $this->configuration['extra_permissions']);
}