You are here

public function MessageAction::access in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php \Drupal\Core\Action\Plugin\Action\MessageAction::access()
  2. 9 core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php \Drupal\Core\Action\Plugin\Action\MessageAction::access()

File

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

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();
}