public function ContentHubCommonActions::getEntityCdfFullKeyedByUuids in Acquia Content Hub 8.2
Generates the CDF of an entity and all its dependencies keyed by UUIDs.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to generate the CDF from.
Return value
\Acquia\ContentHubClient\CDF\CDFObject[]|array An array of CDF Objects.
Throws
\Exception
File
- src/
ContentHubCommonActions.php, line 381
Class
- ContentHubCommonActions
- Common actions across the entirety of Content Hub.
Namespace
Drupal\acquia_contenthubCode
public function getEntityCdfFullKeyedByUuids(EntityInterface $entity) : array {
$entities = [];
$data = [];
$objects = $this
->getEntityCdf($entity, $entities, FALSE);
foreach ($objects as $object) {
$data[$object
->getUuid()] = $object;
}
return $data;
}