public function DurationHumanDisplayFormatter::__construct in Duration Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/DurationHumanDisplayFormatter.php \Drupal\duration_field\Plugin\Field\FieldFormatter\DurationHumanDisplayFormatter::__construct()
- 3.0.x src/Plugin/Field/FieldFormatter/DurationHumanDisplayFormatter.php \Drupal\duration_field\Plugin\Field\FieldFormatter\DurationHumanDisplayFormatter::__construct()
Constructs a DurationHumanDisplayFormatter object.
Parameters
string $plugin_id: The ID of the plugin.
mixed $plugin_definition: The plugin definition.
mixed $field_config: The field definition.
array $settings: The field settings.
mixed $label: The label of the field.
string $view_mode: The current view mode.
array $third_party_settings: The third party settings.
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler service.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ DurationHumanDisplayFormatter.php, line 52
Class
- DurationHumanDisplayFormatter
- Provides a formatter for the duration field type.
Namespace
Drupal\duration_field\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, $field_config, array $settings, $label, $view_mode, array $third_party_settings, ModuleHandlerInterface $moduleHandler) {
parent::__construct($plugin_id, $plugin_definition, $field_config, $settings, $label, $view_mode, $third_party_settings);
$this->moduleHandler = $moduleHandler;
}