You are here

public function PermissionEvent::deletePermission in Organic groups 8

Deletes the given permission.

Parameters

string $name: The name of the permission to delete.

Overrides PermissionEventInterface::deletePermission

2 calls to PermissionEvent::deletePermission()
PermissionEvent::deleteGroupContentOperationPermission in src/Event/PermissionEvent.php
Deletes a group content operation permission by its identifying properties.
PermissionEvent::offsetUnset in src/Event/PermissionEvent.php

File

src/Event/PermissionEvent.php, line 157

Class

PermissionEvent
Event that is fired when OG permissions are compiled.

Namespace

Drupal\og\Event

Code

public function deletePermission($name) {
  if ($this
    ->hasPermission($name)) {
    unset($this->permissions[$name]);
  }
}