You are here

public function Bynder::__construct in Bynder 8

Constructs a new class instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: Entity field manager service.

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

\Drupal\bynder\BynderApiInterface $bynder_api_service: Bynder api service.

\Drupal\Core\Session\AccountProxyInterface $account_proxy: Account proxy.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator service.

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

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache service.

Overrides MediaTypeBase::__construct

File

src/Plugin/MediaEntity/Type/Bynder.php, line 123

Class

Bynder
Provides media type plugin for Bynder.

Namespace

Drupal\bynder\Plugin\MediaEntity\Type

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, BynderApiInterface $bynder_api_service, AccountProxyInterface $account_proxy, UrlGeneratorInterface $url_generator, LoggerChannelFactoryInterface $logger, CacheBackendInterface $cache, TimeInterface $time) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $config_factory
    ->get('media_entity.settings'));
  $this->bynderApi = $bynder_api_service;
  $this->accountProxy = $account_proxy;
  $this->urlGenerator = $url_generator;
  $this->logger = $logger;
  $this->cache = $cache;
  $this->configFactory = $config_factory;
  $this->time = $time;
}