You are here

public function Role::setIsAdmin in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Entity/Role.php \Drupal\user\Entity\Role::setIsAdmin()

Sets the role to be an admin role.

Parameters

bool $is_admin: TRUE if the role should be an admin role.

Return value

$this

Overrides RoleInterface::setIsAdmin

File

core/modules/user/src/Entity/Role.php, line 160

Class

Role
Defines the user role entity class.

Namespace

Drupal\user\Entity

Code

public function setIsAdmin($is_admin) {
  $this->is_admin = $is_admin;
  return $this;
}