public function DurationTimeFormatter::__construct in Duration Field 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/DurationTimeFormatter.php \Drupal\duration_field\Plugin\Field\FieldFormatter\DurationTimeFormatter::__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\duration_field\Service\GranularityServiceInterface $granularityService: The granularity service.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ DurationTimeFormatter.php, line 51
Class
- DurationTimeFormatter
- Provides a time format 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, GranularityServiceInterface $granularityService) {
parent::__construct($plugin_id, $plugin_definition, $field_config, $settings, $label, $view_mode, $third_party_settings);
$this->granularityService = $granularityService;
}