You are here

public function BgImgFieldFormatter::__construct in Background Image Field 8

Constructor for the Background Image Formatter.

Parameters

string $plugin_id: The plugin unique id.

string $plugin_definition: The plugin definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $settings: The stored setting for the formatter.

string $label: The formatters label.

string $view_mode: Which view mode the formatter is in.

array $third_party_settings: Any third party setting that might change how the formatter render the css.

\Drupal\Core\Entity\EntityStorageInterface $responsive_image_style_storage: The responsive image styles created in the system.

\Drupal\Core\Entity\EntityStorageInterface $image_style_storage: The image styles that have been created int eh system.

\Drupal\Core\Utility\LinkGeneratorInterface $link_generator: Help generate links.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides ResponsiveImageFormatter::__construct

File

src/Plugin/Field/FieldFormatter/BgImgFieldFormatter.php, line 68

Class

BgImgFieldFormatter
Plugin implementation of the 'image' formatter.

Namespace

Drupal\bg_img_field\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityStorageInterface $responsive_image_style_storage, EntityStorageInterface $image_style_storage, LinkGeneratorInterface $link_generator, AccountInterface $current_user) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $responsive_image_style_storage, $image_style_storage, $link_generator, $current_user);
  $this->logger = $this
    ->getLogger('bg_img_field');
}