You are here

public function ClientFactory::__construct in Media: Acquia DAM 8

ClientFactory constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config object to retrieve Acquia DAM auth information from.

\GuzzleHttp\ClientInterface $guzzleClient: A fully configured Guzzle client to pass to the dam client.

\Drupal\user\UserDataInterface $userData: A userdata object to retreive user-specific creds from.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The currently authenticated user.

File

src/ClientFactory.php, line 59

Class

ClientFactory
Class ClientFactory.

Namespace

Drupal\media_acquiadam

Code

public function __construct(ConfigFactoryInterface $config_factory, ClientInterface $guzzleClient, UserDataInterface $userData, AccountProxyInterface $currentUser) {
  $this->config = $config_factory
    ->get('media_acquiadam.settings');
  $this->guzzleClient = $guzzleClient;
  $this->userData = $userData;
  $this->currentUser = $currentUser;
}