You are here

private function EckEntityAccessControlHandler::getBypassAccessResult in Entity Construction Kit (ECK) 8

Generates an AccessResult.

Parameters

bool $return_as_object: Should a bool or AccessResult object be returned?

Return value

\Drupal\Core\Access\AccessResult|bool The created access result.

2 calls to EckEntityAccessControlHandler::getBypassAccessResult()
EckEntityAccessControlHandler::access in src/EckEntityAccessControlHandler.php
Checks access to an operation on a given entity or entity translation.
EckEntityAccessControlHandler::createAccess in src/EckEntityAccessControlHandler.php
Checks access to create an entity.

File

src/EckEntityAccessControlHandler.php, line 42

Class

EckEntityAccessControlHandler
Access controller for the EckEntity entity.

Namespace

Drupal\eck

Code

private function getBypassAccessResult($return_as_object) {
  $result = AccessResult::allowed()
    ->cachePerPermissions();
  return $return_as_object ? $result : $result
    ->isAllowed();
}