public function PatternWrapperEntityReferenceFormatter::__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 settings.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
\Drupal\ui_patterns\UiPatternsManager $patterns_manager: The UI Patterns manager.
\Drupal\ui_patterns\UiPatternsSourceManager $source_manager: The UI Patterns source manager.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
Overrides EntityReferenceEntityFormatter::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ PatternWrapperEntityReferenceFormatter.php, line 85
Class
- PatternWrapperEntityReferenceFormatter
- Plugin implementation of 'pattern_wrapper_entity_reference_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, LoggerChannelFactoryInterface $logger_factory, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, UiPatternsManager $patterns_manager, UiPatternsSourceManager $source_manager, ModuleHandlerInterface $module_handler) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $logger_factory, $entity_type_manager, $entity_display_repository);
$this->patternsManager = $patterns_manager;
$this->sourceManager = $source_manager;
$this->moduleHandler = $module_handler;
}