function ActionAjaxTest::access

Same name in other branches
  1. 9 core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php \Drupal\action_form_ajax_test\Plugin\Action\ActionAjaxTest::access()
  2. 8.9.x core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php \Drupal\action_form_ajax_test\Plugin\Action\ActionAjaxTest::access()
  3. 11.x core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php \Drupal\action_form_ajax_test\Plugin\Action\ActionAjaxTest::access()

Overrides ActionInterface::access

File

core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php, line 34

Class

ActionAjaxTest
Plugin used for testing AJAX in action config entity forms.

Namespace

Drupal\action_form_ajax_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.