AccessResultReasonInterface

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

For example, a developer can specify the reason for forbidden access:

new AccessResultForbidden('You are not authorized to hack core');

Hierarchy

See also

\Drupal\Core\Access\AccessResultInterface

File

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

Namespace

Drupal\Core\Access

Members

Name Modifiers Type Description
AccessResultInterface::andIf public function Combine this access result with another using AND.
AccessResultInterface::isAllowed public function Checks whether this access result indicates access is explicitly allowed.
AccessResultInterface::isForbidden public function Checks whether this access result indicates access is explicitly forbidden.
AccessResultInterface::isNeutral public function Checks whether this access result indicates access is not yet determined.
AccessResultInterface::orIf public function Combine this access result with another using OR.
AccessResultReasonInterface::getReason public function Gets the reason for this access result.
AccessResultReasonInterface::setReason public function Sets the reason for this access result.
doc_Drupal
2016-10-29 08:42:37
Comments
Leave a Comment

Please login to continue.