You are here

public function ClientFactory::__construct in Acquia Content Hub 8.2

ClientManagerFactory constructor.

Parameters

\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher: The event dispatcher.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.

\Drupal\Core\Extension\ModuleExtensionList $module_list: The module extension list.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

File

src/Client/ClientFactory.php, line 102

Class

ClientFactory
Instantiates an Acquia ContentHub Client object.

Namespace

Drupal\acquia_contenthub\Client

Code

public function __construct(EventDispatcherInterface $dispatcher, LoggerChannelFactoryInterface $logger_factory, ModuleExtensionList $module_list, ConfigFactoryInterface $config_factory) {
  $this->dispatcher = $dispatcher;
  $this->loggerFactory = $logger_factory;
  $this->moduleList = $module_list;
  $this->config = $config_factory
    ->get('acquia_contenthub.admin_settings');

  // Whenever a new client is constructed, make sure settings are invoked.
  $this
    ->populateSettings();
}