function vppr_entity_access in Vocabulary Permissions Per Role 8
Implements hook_entity_access()
File
- ./
vppr.module, line 97 - Vocabulary Permissions Per Role.
Code
function vppr_entity_access(EntityInterface $entity) {
$entity_type_id = $entity
->getEntityTypeId();
if ($entity_type_id == 'taxonomy_vocabulary' && vppr_access('', $entity
->getConfigTarget()) || $entity_type_id == 'taxonomy_term') {
return AccessResult::allowed();
}
return AccessResult::neutral();
}