public function PatternFormatter::__construct in UI Patterns Field Formatters 8
Constructs a Drupal\Component\Plugin\PluginBase 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\ui_patterns\UiPatternsManager $patterns_manager: UI Patterns manager.
\Drupal\ui_patterns\UiPatternsSourceManager $source_manager: UI Patterns source manager.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ PatternFormatter.php, line 107
Class
- PatternFormatter
- Plugin implementation of the 'pattern' formatter.
Namespace
Drupal\ui_patterns_field_formatters\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, UiPatternsManager $patterns_manager, UiPatternsSourceManager $source_manager, ModuleHandlerInterface $module_handler) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->patternsManager = $patterns_manager;
$this->sourceManager = $source_manager;
$this->moduleHandler = $module_handler;
}