public function ChartConfigItemDefaultWidget::__construct in Charts 5.0.x
Same name and namespace in other branches
- 8.4 src/Plugin/Field/FieldWidget/ChartConfigItemDefaultWidget.php \Drupal\charts\Plugin\Field\FieldWidget\ChartConfigItemDefaultWidget::__construct()
Constructs a ChartItemDefaultWidget instance.
Parameters
string $plugin_id: The plugin_id for the widget.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.
array $settings: The widget settings.
array $third_party_settings: Any third party settings.
\Drupal\charts\Services\ChartsSettingsService $charts_settings: Default chart settings.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ ChartConfigItemDefaultWidget.php, line 50
Class
- ChartConfigItemDefaultWidget
- Plugin implementation of the 'chart_config_default' widget.
Namespace
Drupal\charts\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ChartsSettingsService $charts_settings) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->chartsDefaultSettings = $charts_settings
->getChartsSettings();
}