You are here

public function SvgImageFormatter::__construct in Svg Image 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/SvgImageFormatter.php \Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter::__construct()
  2. 1.x src/Plugin/Field/FieldFormatter/SvgImageFormatter.php \Drupal\svg_image\Plugin\Field\FieldFormatter\SvgImageFormatter::__construct()

Constructs an ImageFormatter 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 settings.

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

\Drupal\Core\Entity\EntityStorageInterface $image_style_storage: The image style storage.

Overrides ImageFormatter::__construct

File

src/Plugin/Field/FieldFormatter/SvgImageFormatter.php, line 48

Class

SvgImageFormatter
Plugin implementation of the 'image' formatter.

Namespace

Drupal\svg_image\Plugin\Field\FieldFormatter

Code

public function __construct($pluginId, $pluginDefinition, FieldDefinitionInterface $fieldDefinition, array $settings, $label, $viewMode, array $thirdPartySettings, AccountInterface $currentUser, EntityStorageInterface $ImageStyleStorage, LoggerInterface $logger) {
  parent::__construct($pluginId, $pluginDefinition, $fieldDefinition, $settings, $label, $viewMode, $thirdPartySettings, $currentUser, $ImageStyleStorage);
  $this->logger = $logger;
}