You are here

public function EntityFieldAccessEvent::__construct in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/src/Event/Entity/EntityFieldAccessEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityFieldAccessEvent::__construct()

EntityFieldAccessEvent constructor.

Parameters

string $operation: The operation.

\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: The field definition.

\Drupal\Core\Session\AccountInterface $account: The account interface.

\Drupal\Core\Field\FieldItemListInterface|null $items: The field item list interface.

File

modules/core_event_dispatcher/src/Event/Entity/EntityFieldAccessEvent.php, line 62

Class

EntityFieldAccessEvent
Class EntityInsertEvent.

Namespace

Drupal\core_event_dispatcher\Event\Entity

Code

public function __construct(string $operation, FieldDefinitionInterface $fieldDefinition, AccountInterface $account, FieldItemListInterface $items = NULL) {
  $this->operation = $operation;
  $this->fieldDefinition = $fieldDefinition;
  $this->account = $account;
  $this->items = $items;
  $this->accessResult = AccessResultNeutral::neutral();
}