protected function CdfVersionAttribute::setVersion in Acquia Content Hub 8.2
Internal function to set the version for a CDF.
Parameters
\Acquia\ContentHubClient\CDF\CDFObject $cdf: A CDFObject instance.
2 calls to CdfVersionAttribute::setVersion()
- CdfVersionAttribute::onBuildClientCdf in src/
EventSubscriber/ CdfAttributes/ CdfVersionAttribute.php - Adds a version attribute to Cdf Objects.
- CdfVersionAttribute::onPopulateAttributes in src/
EventSubscriber/ CdfAttributes/ CdfVersionAttribute.php - Adds a version attribute to Cdf Objects.
File
- src/
EventSubscriber/ CdfAttributes/ CdfVersionAttribute.php, line 62
Class
- CdfVersionAttribute
- Notates the metadata with a CDF version marker.
Namespace
Drupal\acquia_contenthub\EventSubscriber\CdfAttributesCode
protected function setVersion(CDFObject $cdf) {
$metadata = $cdf
->getMetadata();
$metadata['version'] = 2;
$cdf
->setMetadata($metadata);
}