You are here

public function ClientManager::isConnected in Acquia Content Hub 8

Checks whether the current client has a valid connection to Content Hub.

Return value

bool TRUE if client is connected, FALSE otherwise.

Overrides ClientManagerInterface::isConnected

File

src/Client/ClientManager.php, line 205

Class

ClientManager
Provides a service for managing pending server tasks.

Namespace

Drupal\acquia_contenthub\Client

Code

public function isConnected() {

  // Always do a quick check.
  if (empty($this
    ->getConnection())) {
    return FALSE;
  }

  // If we reached here then client has a valid connection.
  return TRUE;
}