function MessageAction::access

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

Overrides ActionInterface::access

File

core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php, line 130

Class

MessageAction
Sends a message to the current user's screen.

Namespace

Drupal\Core\Action\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.