function BasicExample::access
Same name in other branches
- 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\ActionCode
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
$result = AccessResult::allowed();
return $return_as_object ? $result : $result->isAllowed();
}