protected function AcquiaContenthubCommands::handleNormalizedData in Acquia Content Hub 8
Refactors the data object returned by the normalizer into a regular array.
Parameters
array $normalized_data: The normalized array of objects.
Return value
array An array that mirrors the sort of data in the remote storage.
2 calls to AcquiaContenthubCommands::handleNormalizedData()
- AcquiaContenthubCommands::contenthubCompare in src/
Commands/ AcquiaContenthubCommands.php - Loads the CDF from a local and remote source, compares them and prints the differences.
- AcquiaContenthubCommands::contenthubLocal in src/
Commands/ AcquiaContenthubCommands.php - Prints the CDF from a local source (drupal site)
File
- src/
Commands/ AcquiaContenthubCommands.php, line 810
Class
- AcquiaContenthubCommands
- A Drush commandfile.
Namespace
Drupal\acquia_contenthub\CommandsCode
protected function handleNormalizedData($normalized_data) {
foreach ($normalized_data['entities'] as &$entity) {
$entity = (array) $entity;
foreach ($entity['attributes'] as $key => $value) {
$entity['attributes'][$key] = (array) $value;
}
foreach ($entity['assets'] as $key => $value) {
$entity['assets'][$key] = (array) $value;
}
}
return $normalized_data;
}