public function OgRole::isRequired in Organic groups 8
Returns if this is a default role which is required and cannot be deleted.
Return value
bool True if this is a default role. False otherwise.
Overrides OgRoleInterface::isRequired
1 call to OgRole::isRequired()
- OgRole::delete in src/
Entity/ OgRole.php - Deletes an entity permanently.
File
- src/
Entity/ OgRole.php, line 265
Class
- OgRole
- Defines the OG user role entity class.
Namespace
Drupal\og\EntityCode
public function isRequired() {
return static::getRoleTypeByName($this
->getName()) === OgRoleInterface::ROLE_TYPE_REQUIRED;
}