function NoType::access

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php \Drupal\action_test\Plugin\Action\NoType::access()
  2. 10 core/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php \Drupal\action_test\Plugin\Action\NoType::access()
  3. 11.x core/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php \Drupal\action_test\Plugin\Action\NoType::access()

Overrides ActionInterface::access

File

core/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php, line 28

Class

NoType
Provides an operation with no type specified.

Namespace

Drupal\action_test\Plugin\Action

Code

public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
    $result = AccessResult::allowed();
    return $return_as_object ? $result : $result->isAllowed();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.