You are here

protected function ClientFactory::getClientUserAgent in Acquia Content Hub 8.2

Returns Client's user agent.

Return value

string User Agent.

2 calls to ClientFactory::getClientUserAgent()
ClientFactory::getClient in src/Client/ClientFactory.php
Instantiates the content hub client.
ClientFactoryMock::getClient in tests/modules/acquia_contenthub_server_test/src/Client/ClientFactoryMock.php
Instantiates the content hub client.

File

src/Client/ClientFactory.php, line 200

Class

ClientFactory
Instantiates an Acquia ContentHub Client object.

Namespace

Drupal\acquia_contenthub\Client

Code

protected function getClientUserAgent() {

  // Find out the module version in use.
  $module_info = $this->moduleList
    ->getExtensionInfo('acquia_contenthub');
  $module_version = isset($module_info['version']) ? $module_info['version'] : '0.0.0';
  $drupal_version = isset($module_info['core']) ? $module_info['core'] : '0.0.0';
  return 'AcquiaContentHub/' . $drupal_version . '-' . $module_version;
}