You are here

public function ContentHubDeleteClientConfirmForm::getWebhookUuid in Acquia Content Hub 8.2

Get webhook UUID.

Return value

string Webhook uuid.

Throws

\Exception

1 call to ContentHubDeleteClientConfirmForm::getWebhookUuid()
ContentHubDeleteClientConfirmForm::buildForm in src/Form/ContentHubDeleteClientConfirmForm.php
Form constructor.
1 method overrides ContentHubDeleteClientConfirmForm::getWebhookUuid()
ClientDeleteConfirmForm::getWebhookUuid in modules/acquia_contenthub_publisher/src/Form/Client/ClientDeleteConfirmForm.php
Get webhook UUID.

File

src/Form/ContentHubDeleteClientConfirmForm.php, line 200

Class

ContentHubDeleteClientConfirmForm
Class ContentHubDeleteClientConfirmForm.

Namespace

Drupal\acquia_contenthub\Form

Code

public function getWebhookUuid() : string {
  $client = $this->clientFactory
    ->getClient();
  $settings = $client
    ->getSettings();
  $remote_settings = $client
    ->getRemoteSettings();
  foreach ($remote_settings['webhooks'] as $webhook) {
    if ($webhook['client_name'] === $settings
      ->getName()) {
      return $webhook['uuid'];
    }
  }
  return '';
}