function drush_acquia_contenthub_mapping in Acquia Content Hub 8
Shows the field mappings in Elastic search for the current subscription.
These field mappings shows the data types used in Elastic Search to index content related to entities submitted to Content Hub.
File
- ./
acquia_contenthub.drush.inc, line 671 - ContentHub Drush Commands.
Code
function drush_acquia_contenthub_mapping() {
/** @var \Drupal\acquia_contenthub\Client\ClientManager $client_manager */
$client_manager = \Drupal::service('acquia_contenthub.client_manager');
if ($client_manager
->isConnected()) {
$output = $client_manager
->createRequest('mapping');
}
else {
return drush_set_error(dt('Error trying to connect to the Content Hub. Make sure this site is registered to Content hub.'));
}
if ($output) {
return $output;
}
else {
return drush_set_error(dt("Error trying to print the elastic search field mappings."));
}
}