public function CreateCdfEntityEvent::addCdf in Acquia Content Hub 8.2
Adds a CDF object for this entity.
Multiple CDF objects can be created for a single entity. Different representations for different purposes are completely allowable and expected. An example of this would be the Lift Support module creates CDF documents that represent the HTML output of a rendered entity, but ContentHub creates CDF documents for the entity structure itself. The only caveat is that these CDF objects must have different UUIDs. The ContentHub subscribers that generate CDF objects for entities are considered the canonical handlers and use the Entity's own UUID. All other representations must generate and track their UUIDs separately.
Parameters
\Acquia\ContentHubClient\CDF\CDFObject $cdf: The CDF object.
File
- src/
Event/ CreateCdfEntityEvent.php, line 91
Class
- CreateCdfEntityEvent
- The event dispatched to create new CDF objects.
Namespace
Drupal\acquia_contenthub\EventCode
public function addCdf(CDFObject $cdf) {
$this->cdfs[] = $cdf;
}