public function WebformEntityReferenceEntityFormatter::__construct in Webform 8.5
WebformEntityReferenceEntityFormatter constructor.
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: Third party settings.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\webform\WebformMessageManagerInterface $message_manager: The webform message manager.
\Drupal\webform\WebformRequestInterface $request_handler: The webform request handler.
Overrides WebformEntityReferenceFormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ WebformEntityReferenceEntityFormatter.php, line 92
Class
- WebformEntityReferenceEntityFormatter
- Plugin implementation of the 'Webform rendered entity' formatter.
Namespace
Drupal\webform\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, RendererInterface $renderer, ConfigFactoryInterface $config_factory, RouteMatchInterface $route_match, EntityTypeManagerInterface $entity_type_manager, WebformMessageManagerInterface $message_manager, WebformRequestInterface $request_handler = NULL) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $renderer, $config_factory);
$this->routeMatch = $route_match;
$this->entityTypeManager = $entity_type_manager;
$this->messageManager = $message_manager;
$this->requestHandler = $request_handler ?: \Drupal::service('webform.request');
}