You are here

public function PermissionEvent::hasPermission in Organic groups 8

Returns whether or not the given permission exists.

Parameters

string $name: The name of the permission for which to verify the existance.

Return value

bool TRUE if the permission exists, FALSE otherwise.

Overrides PermissionEventInterface::hasPermission

3 calls to PermissionEvent::hasPermission()
PermissionEvent::deletePermission in src/Event/PermissionEvent.php
Deletes the given permission.
PermissionEvent::offsetExists in src/Event/PermissionEvent.php
PermissionEvent::offsetUnset in src/Event/PermissionEvent.php

File

src/Event/PermissionEvent.php, line 174

Class

PermissionEvent
Event that is fired when OG permissions are compiled.

Namespace

Drupal\og\Event

Code

public function hasPermission($name) {
  return isset($this->permissions[$name]);
}