function BasicExample::access

Same name in other branches
  1. 3.x modules/action_example/src/Plugin/Action/BasicExample.php \Drupal\action_example\Plugin\Action\BasicExample::access()

Overrides ActionInterface::access

File

modules/action_example/src/Plugin/Action/BasicExample.php, line 62

Class

BasicExample
A basic example action that does nothing.

Namespace

Drupal\action_example\Plugin\Action

Code

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