function AccessResultReasonInterface::getReason
Same name in other branches
- 9 core/lib/Drupal/Core/Access/AccessResultReasonInterface.php \Drupal\Core\Access\AccessResultReasonInterface::getReason()
- 8.9.x core/lib/Drupal/Core/Access/AccessResultReasonInterface.php \Drupal\Core\Access\AccessResultReasonInterface::getReason()
- 11.x core/lib/Drupal/Core/Access/AccessResultReasonInterface.php \Drupal\Core\Access\AccessResultReasonInterface::getReason()
Gets the reason for this access result.
Return value
string The reason of this access result or an empty string 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 24
Class
- AccessResultReasonInterface
- Interface for access result value objects with stored reason for developers.
Namespace
Drupal\Core\AccessCode
public function getReason();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.