public function BynderFormatterBase::__construct in Bynder 8.3
Same name and namespace in other branches
- 4.0.x src/Plugin/Field/FieldFormatter/BynderFormatterBase.php \Drupal\bynder\Plugin\Field\FieldFormatter\BynderFormatterBase::__construct()
Constructs a BynderFormatter object.
Parameters
string $plugin_id: The plugin_id for the formatter.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.
array $settings: The formatter settings.
string $label: The formatter label display setting.
string $view_mode: The view mode.
array $third_party_settings: Any third party settings.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory.
\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.
\Drupal\bynder\BynderApiInterface $bynder: The Bynder API service.
\Drupal\Core\Render\RendererInterface $renderer_object: Renderer object.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ BynderFormatterBase.php, line 95
Class
- BynderFormatterBase
- Base class for Bynder formatters.
Namespace
Drupal\bynder\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, ConfigFactoryInterface $config_factory, AccountProxyInterface $current_user, BynderApiInterface $bynder, RendererInterface $renderer_object, EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->configFactory = $config_factory;
$this->currentUser = $current_user;
$this->bynder = $bynder;
$this->renderer = $renderer_object;
$this->entityFieldManager = $entity_field_manager;
$this->entityTypeManager = $entity_type_manager;
}