You are here

public function PermissionEvent::deleteGroupContentOperationPermission in Organic groups 8

Deletes a group content operation permission by its identifying properties.

Parameters

string $entity_type_id: The group content entity type ID to which this permission applies.

string $bundle_id: The group content bundle ID to which this permission applies.

string $operation: The entity operation to which this permission applies.

bool $owner: Set to FALSE if this permission applies to all entities, or to TRUE if it only applies to the ones owned by the user. Defaults to FALSE.

Overrides PermissionEventInterface::deleteGroupContentOperationPermission

1 call to PermissionEvent::deleteGroupContentOperationPermission()
PermissionEvent::setPermission in src/Event/PermissionEvent.php
Sets the permission with the given data.

File

src/Event/PermissionEvent.php, line 166

Class

PermissionEvent
Event that is fired when OG permissions are compiled.

Namespace

Drupal\og\Event

Code

public function deleteGroupContentOperationPermission($entity_type_id, $bundle_id, $operation, $owner = 'any') {
  $permission = $this
    ->getGroupContentOperationPermission($entity_type_id, $bundle_id, $operation, $owner);
  $this
    ->deletePermission($permission
    ->getName());
}