public function GeneralImageFormatter::__construct in Formatter Suite 8
Constructs a GeneralImageFormatter object.
Parameters
string $pluginId: The pluginId for the formatter.
mixed $pluginDefinition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: 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 $thirdPartySettings: Any third party settings settings.
\Drupal\Core\Session\AccountInterface $currentUser: The current user.
\Drupal\Core\Entity\EntityStorageInterface $imageStyleStorage: The image style storage.
\Drupal\Core\Entity\EntityRepository $entityRepository: The entity repository.
Overrides ImageFormatter::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ GeneralImageFormatter.php, line 94
Class
- GeneralImageFormatter
- Formats an image.
Namespace
Drupal\formatter_suite\Plugin\Field\FieldFormatterCode
public function __construct($pluginId, $pluginDefinition, FieldDefinitionInterface $fieldDefinition, array $settings, $label, $view_mode, array $thirdPartySettings, AccountInterface $currentUser, EntityStorageInterface $imageStyleStorage, EntityRepository $entityRepository) {
parent::__construct($pluginId, $pluginDefinition, $fieldDefinition, $settings, $label, $view_mode, $thirdPartySettings, $currentUser, $imageStyleStorage);
$this->entityRepository = $entityRepository;
}