You are here

public static function SocialEventManagersAccessHelper::getEntityAccessResult in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  2. 8.2 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  3. 8.3 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  4. 8.4 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  5. 8.5 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  6. 8.6 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  7. 8.7 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  8. 8.8 modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  9. 10.3.x modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  10. 10.0.x modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  11. 10.1.x modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()
  12. 10.2.x modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php \Drupal\social_event_managers\SocialEventManagersAccessHelper::getEntityAccessResult()

Gets the Entity access for the given node.

1 call to SocialEventManagersAccessHelper::getEntityAccessResult()
social_event_managers_node_access in modules/social_features/social_event/modules/social_event_managers/social_event_managers.module
Implements hook_node_access().

File

modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersAccessHelper.php, line 43

Class

SocialEventManagersAccessHelper
Helper class for checking update access on event managers nodes.

Namespace

Drupal\social_event_managers

Code

public static function getEntityAccessResult(NodeInterface $node, $op, AccountInterface $account) {
  $access = SocialEventManagersAccessHelper::nodeAccessCheck($node, $op, $account);
  switch ($access) {
    case 2:
      return AccessResult::allowed()
        ->cachePerPermissions()
        ->addCacheableDependency($node);
    case 1:
      return AccessResult::forbidden();
  }
  return AccessResult::neutral();
}