public static function EntityAccessHelper::getEntityAccessResult in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.2 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.3 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.4 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.5 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.6 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.7 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 8.8 modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 10.3.x modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 10.0.x modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 10.1.x modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
- 10.2.x modules/custom/entity_access_by_field/src/EntityAccessHelper.php \Drupal\entity_access_by_field\EntityAccessHelper::getEntityAccessResult()
Gets the Entity access for the given node.
1 call to EntityAccessHelper::getEntityAccessResult()
- entity_access_by_field_node_access in modules/
custom/ entity_access_by_field/ entity_access_by_field.module - Implements hook_node_access().
File
- modules/
custom/ entity_access_by_field/ src/ EntityAccessHelper.php, line 85
Class
- EntityAccessHelper
- Helper class for checking entity access.
Namespace
Drupal\entity_access_by_fieldCode
public static function getEntityAccessResult(NodeInterface $node, $op, AccountInterface $account) {
$access = EntityAccessHelper::nodeAccessCheck($node, $op, $account);
switch ($access) {
case 2:
return AccessResult::allowed()
->cachePerPermissions()
->addCacheableDependency($node);
case 1:
return AccessResult::forbidden();
}
return AccessResult::neutral();
}