You are here

public function ContentHubConnectionManager::webhookIsRegistered in Acquia Content Hub 8.2

Checks whether the webhook has already been registered.

Parameters

string $webhook_url: The webhook's url.

Return value

bool TRUE if the webhook is registered.

Throws

\Exception

1 call to ContentHubConnectionManager::webhookIsRegistered()
ContentHubConnectionManager::updateWebhook in src/ContentHubConnectionManager.php
Updates the specified webhook on Content Hub.

File

src/ContentHubConnectionManager.php, line 420

Class

ContentHubConnectionManager
Responsible for connection management actions.

Namespace

Drupal\acquia_contenthub

Code

public function webhookIsRegistered(string $webhook_url) : bool {
  $this
    ->initialize();
  $resp = $this->client
    ->getWebHook($webhook_url);
  return !empty($resp);
}