public function FileDownloadLinkMedia::__construct in File Download Link 8
Constructs a FileDownloadLink 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\Extension\ModuleHandler $module_handler: Module handler service.
\Drupal\token\TokenEntityMapper|null $token_entity_mapper: Token entity mapper if token module is installed. Otherwise NULL.
Overrides FormatterBase::__construct
File
- modules/
file_downoad_link_media/ src/ Plugin/ Field/ FieldFormatter/ FileDownloadLinkMedia.php, line 64
Class
- FileDownloadLinkMedia
- Plugin implementation of the 'file_download_link_media' formatter.
Namespace
Drupal\file_download_link_media\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, ModuleHandler $module_handler, $token_entity_mapper) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->moduleHandler = $module_handler;
$this->tokenEntityMapper = $token_entity_mapper;
}