You are here

public function TeamRole::grantPermission in Apigee Edge 8

Grant permissions to the role.

Parameters

string $permission: The permission to grant.

Overrides TeamRoleInterface::grantPermission

File

modules/apigee_edge_teams/src/Entity/TeamRole.php, line 105

Class

TeamRole
Defines the Team Role entity.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function grantPermission($permission) : void {
  if (!$this
    ->hasPermission($permission)) {
    $this->permissions[] = $permission;
  }
}