You are here

public function AccessResultReasonInterface::getReason in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Access/AccessResultReasonInterface.php \Drupal\Core\Access\AccessResultReasonInterface::getReason()

Gets the reason for this access result.

Return value

string|null The reason of this access result or NULL if no reason is provided.

2 methods override AccessResultReasonInterface::getReason()
AccessResultForbidden::getReason in core/lib/Drupal/Core/Access/AccessResultForbidden.php
Gets the reason for this access result.
AccessResultNeutral::getReason in core/lib/Drupal/Core/Access/AccessResultNeutral.php
Gets the reason for this access result.

File

core/lib/Drupal/Core/Access/AccessResultReasonInterface.php, line 23

Class

AccessResultReasonInterface
Interface for access result value objects with stored reason for developers.

Namespace

Drupal\Core\Access

Code

public function getReason();