You are here

public function RemoveNonPublicFiles::onSerializeContentField in Acquia Content Hub 8.2

Serialize content field event.

Parameters

\Drupal\acquia_contenthub\Event\SerializeCdfEntityFieldEvent $event: Serialized CDF Entity Field event.

File

src/EventSubscriber/FilterDeps/RemoveNonPublicFiles.php, line 74

Class

RemoveNonPublicFiles
Class RemoveNonPublicFiles.

Namespace

Drupal\acquia_contenthub\EventSubscriber\FilterDeps

Code

public function onSerializeContentField(SerializeCdfEntityFieldEvent $event) {
  $field = $event
    ->getField();
  if (!$this
    ->includeField($field)) {
    $event
      ->setExcluded();
    $event
      ->stopPropagation();
  }
}