You are here

public function EntityAccessEvent::setAccessResult in Hook Event Dispatcher 8

Set the access result.

Parameters

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

Deprecated

in favour of addAccessResult() which is more descriptive.

File

src/Event/Entity/EntityAccessEvent.php, line 91

Class

EntityAccessEvent
Class EntityAccessEvent.

Namespace

Drupal\hook_event_dispatcher\Event\Entity

Code

public function setAccessResult(AccessResultInterface $accessResult) {
  $this
    ->addAccessResult($accessResult);
}