protected function AcquiaContentHubEntityCommands::decodeEntityArrayMetadata in Acquia Content Hub 8.2
Decodes the base64 'data' element inside a CDF entity 'metadata'.
Parameters
array $cdf_entity: The CDF entity array before it is written to the output.
1 call to AcquiaContentHubEntityCommands::decodeEntityArrayMetadata()
- AcquiaContentHubEntityCommands::contenthubEntity in src/
Commands/ AcquiaContentHubEntityCommands.php - Retrieves an Entity from a local source or contenthub.
File
- src/
Commands/ AcquiaContentHubEntityCommands.php, line 234
Class
- AcquiaContentHubEntityCommands
- Drush commands for interacting with Acquia Content Hub entities.
Namespace
Drupal\acquia_contenthub\CommandsCode
protected function decodeEntityArrayMetadata(array &$cdf_entity) {
$types = [
'drupal8_content_entity',
'drupal8_config_entity',
'rendered_entity',
];
if (in_array($cdf_entity['type'], $types)) {
$cdf_entity['metadata']['data'] = base64_decode($cdf_entity['metadata']['data']);
}
}