protected EntityAccessControlHandler::processAccessHookResults(array $access)
We grant access to the entity if both of these conditions are met:
\Drupal\Core\Access\AccessResultInterface[] $access: An array of access results of the fired access hook.
\Drupal\Core\Access\AccessResultInterface The combined result of the various access checks' results. All their cacheability metadata is merged as well.
\Drupal\Core\Access\AccessResultInterface::orIf()
protected function processAccessHookResults(array $access) { // No results means no opinion. if (empty($access)) { return AccessResult::neutral(); } /** @var \Drupal\Core\Access\AccessResultInterface $result */ $result = array_shift($access); foreach ($access as $other) { $result = $result->orIf($other); } return $result; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityAccessControlHandler.php/function/EntityAccessControlHandler::processAccessHookResults/8.1.x