function taxonomy_permissions_entity_delete in Taxonomy Permissions 8
Implements hook_entity_delete().
File
Code
function taxonomy_permissions_entity_delete(EntityInterface $entity) {
if ($entity
->getEntityTypeId() == 'taxonomy_vocabulary') {
$perms[] = 'view terms in ' . $entity
->id();
user_role_revoke_permissions(AccountInterface::ANONYMOUS_ROLE, $perms);
user_role_revoke_permissions(AccountInterface::AUTHENTICATED_ROLE, $perms);
}
}