You are here

public function EntityAccessEvent::addAccessResult in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Entity/EntityAccessEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityAccessEvent::addAccessResult()

Add the access result.

Parameters

\Drupal\Core\Access\AccessResultInterface $accessResult: The access result.

File

modules/core_event_dispatcher/src/Event/Entity/EntityAccessEvent.php, line 89

Class

EntityAccessEvent
Class EntityAccessEvent.

Namespace

Drupal\core_event_dispatcher\Event\Entity

Code

public function addAccessResult(AccessResultInterface $accessResult) : void {
  $this->accessResult = $this->accessResult
    ->orIf($accessResult);
}