You are here

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

Same name in this branch
  1. 8 src/Acquiadam.php \Drupal\media_acquiadam\Acquiadam::__construct()
  2. 8 src/Plugin/EntityBrowser/Widget/Acquiadam.php \Drupal\media_acquiadam\Plugin\EntityBrowser\Widget\Acquiadam::__construct()

Acquiadam constructor.

Parameters

\Drupal\media_acquiadam\ClientFactory $client_factory: An instance of ClientFactory that we can get a webdam client from.

string $credential_type: The type of credentials to use.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerChannelFactory: The Drupal LoggerChannelFactory service.

File

src/Acquiadam.php, line 48

Class

Acquiadam
Class Acquiadam.

Namespace

Drupal\media_acquiadam

Code

public function __construct(ClientFactory $client_factory, $credential_type, LoggerChannelFactoryInterface $loggerChannelFactory) {
  $this->acquiaDamClient = $client_factory
    ->get($credential_type);
  $this->loggerChannel = $loggerChannelFactory
    ->get('media_acquiadam');
}