You are here

public function BynderService::__construct in Bynder 4.0.x

Same name and namespace in other branches
  1. 8.3 src/BynderService.php \Drupal\bynder\BynderService::__construct()
  2. 8.2 src/BynderService.php \Drupal\bynder\BynderService::__construct()

BynderMetadataService constructor.

Parameters

\Drupal\bynder\BynderApiInterface $bynder_api: The Bynder API service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

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

\Drupal\Core\State\StateInterface $state: The state service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

File

src/BynderService.php, line 110

Class

BynderService
Bynder service.

Namespace

Drupal\bynder

Code

public function __construct(BynderApiInterface $bynder_api, EntityTypeManagerInterface $entity_type_manager, LoggerChannelFactoryInterface $logger_factory, StateInterface $state, TimeInterface $time, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler = NULL) {
  $this->bynderApi = $bynder_api;
  $this->entityTypeManager = $entity_type_manager;
  $this->logger = $logger_factory
    ->get('bynder');
  $this->state = $state;
  $this->time = $time;
  $this->configFactory = $config_factory;
  $this->mediaStorage = $entity_type_manager
    ->getStorage('media');
  $this->moduleHandler = $module_handler ?: \Drupal::service('module_handler');
}