You are here

public function DefaultRoleEvent::hasRole in Organic groups 8

Returns whether or not the given role exists.

Parameters

string $name: The name of the role for which to verify the existence.

Return value

bool TRUE if the role exists, FALSE otherwise.

Overrides DefaultRoleEventInterface::hasRole

1 call to DefaultRoleEvent::hasRole()
DefaultRoleEvent::offsetExists in src/Event/DefaultRoleEvent.php

File

src/Event/DefaultRoleEvent.php, line 93

Class

DefaultRoleEvent
Event that is fired when default roles are compiled.

Namespace

Drupal\og\Event

Code

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