function GotoAction::access

Same name in other branches
  1. 9 core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php \Drupal\Core\Action\Plugin\Action\GotoAction::access()
  2. 8.9.x core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php \Drupal\Core\Action\Plugin\Action\GotoAction::access()
  3. 11.x core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php \Drupal\Core\Action\Plugin\Action\GotoAction::access()

Overrides ActionInterface::access

File

core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php, line 136

Class

GotoAction
Redirects to a different URL.

Namespace

Drupal\Core\Action\Plugin\Action

Code

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

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