You are here

public function GroupRole::revokePermissions in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupRole.php \Drupal\group\Entity\GroupRole::revokePermissions()

Revokes multiple permissions from the role.

Parameters

string[] $permissions: The permissions to revoke.

Return value

\Drupal\group\Entity\GroupRoleInterface The group role this was called on.

Overrides GroupRoleInterface::revokePermissions

2 calls to GroupRole::revokePermissions()
GroupRole::changePermissions in src/Entity/GroupRole.php
Changes permissions for the role.
GroupRole::revokePermission in src/Entity/GroupRole.php
Revokes a permission from the role.

File

src/Entity/GroupRole.php, line 257

Class

GroupRole
Defines the Group role configuration entity.

Namespace

Drupal\group\Entity

Code

public function revokePermissions($permissions) {
  $this->permissions = array_diff($this->permissions, $permissions);
  return $this;
}