You are here

public function DefaultRoleEventInterface::setRole in Organic groups 8

Sets a default roles.

Parameters

\Drupal\og\Entity\OgRole $role: The OgRole entity to set. This should be an unsaved entity that doesn't have the group entity type and bundle IDs set.

Throws

\InvalidArgumentException Thrown when the role name is empty, or when the 'label' property is missing.

1 method overrides DefaultRoleEventInterface::setRole()
DefaultRoleEvent::setRole in src/Event/DefaultRoleEvent.php
Sets a default roles.

File

src/Event/DefaultRoleEventInterface.php, line 76

Class

DefaultRoleEventInterface
Interface for DefaultRoleEvent classes.

Namespace

Drupal\og\Event

Code

public function setRole(OgRole $role);