You are here

public function ExcludeEntityFieldEvent::__construct in Acquia Content Hub 8.2

SerializeCdfEntityFieldEvent constructor.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to which the field belongs.

string $field_name: The name of the field.

\Drupal\Core\Field\FieldItemListInterface $field: The field item list object.

File

src/Event/ExcludeEntityFieldEvent.php, line 60

Class

ExcludeEntityFieldEvent
Event fired when serializing individual entity fields for syndication.

Namespace

Drupal\acquia_contenthub\Event

Code

public function __construct(EntityInterface $entity, string $field_name, FieldItemListInterface $field) {
  $this->entity = $entity;
  $this->fieldName = $field_name;
  $this->field = $field;
}