You are here

public function ClientManager::isClientNameAvailable in Acquia Content Hub 8

Checks whether the client name given is available in this Subscription.

Parameters

string $client_name: The client name to check availability.

Return value

bool TRUE if available, FALSE otherwise.

File

src/Client/ClientManager.php, line 224

Class

ClientManager
Provides a service for managing pending server tasks.

Namespace

Drupal\acquia_contenthub\Client

Code

public function isClientNameAvailable($client_name) {
  if ($site = $this
    ->createRequest('getClientByName', [
    $client_name,
  ])) {
    if (isset($site['uuid']) && Uuid::isValid($site['uuid'])) {
      return FALSE;
    }
  }
  return TRUE;
}