You are here

protected function GroupContentOperationPermission::validate in Organic groups 8

Validates the given property and value.

Parameters

string $property: The property to validate.

mixed $value: The value to validate.

Overrides Permission::validate

File

src/GroupContentOperationPermission.php, line 147

Class

GroupContentOperationPermission
A group level permission.

Namespace

Drupal\og

Code

protected function validate($property, $value) {
  parent::validate($property, $value);
  if ($property === 'owner' && !is_bool($value)) {
    throw new \InvalidArgumentException('The owner should be a boolean value.');
  }
}