function drush_acquia_contenthub_update_secret in Acquia Content Hub 8
Updates the Shared Secret from the Content Hub.
File
- ./
acquia_contenthub.drush.inc, line 726 - ContentHub Drush Commands.
Code
function drush_acquia_contenthub_update_secret() {
/** @var \Drupal\acquia_contenthub\Client\ClientManager $client_manager */
$client_manager = \Drupal::service('acquia_contenthub.client_manager');
/** @var \Drupal\acquia_contenthub\ContentHubSubscription $subscription */
$subscription = \Drupal::service('acquia_contenthub.acquia_contenthub_subscription');
if ($client_manager
->isConnected()) {
$subscription
->getSettings();
drush_print(dt('The shared secret has been updated.'));
}
else {
drush_set_error(dt('The Content Hub client is not connected so the shared secret can not be updated.'));
}
}