You are here

public function CdfVersionAttribute::onBuildClientCdf in Acquia Content Hub 8.2

Adds a version attribute to Cdf Objects.

Parameters

\Drupal\acquia_contenthub\Event\BuildClientCdfEvent $event: The BuildClientCdfEvent object.

File

src/EventSubscriber/CdfAttributes/CdfVersionAttribute.php, line 51

Class

CdfVersionAttribute
Notates the metadata with a CDF version marker.

Namespace

Drupal\acquia_contenthub\EventSubscriber\CdfAttributes

Code

public function onBuildClientCdf(BuildClientCdfEvent $event) {
  $cdf = $event
    ->getCdf();
  $this
    ->setVersion($cdf);
}