You are here

public function CommentGroupContentFormatter::__construct in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/custom/group_core_comments/src/Plugin/Field/FieldFormatter/CommentGroupContentFormatter.php \Drupal\group_core_comments\Plugin\Field\FieldFormatter\CommentGroupContentFormatter::__construct()
  2. 10.0.x modules/custom/group_core_comments/src/Plugin/Field/FieldFormatter/CommentGroupContentFormatter.php \Drupal\group_core_comments\Plugin\Field\FieldFormatter\CommentGroupContentFormatter::__construct()
  3. 10.1.x modules/custom/group_core_comments/src/Plugin/Field/FieldFormatter/CommentGroupContentFormatter.php \Drupal\group_core_comments\Plugin\Field\FieldFormatter\CommentGroupContentFormatter::__construct()

Constructs a new CommentDefaultFormatter.

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\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Entity\EntityFormBuilderInterface $entity_form_builder: The entity form builder.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match object.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.

\Drupal\Core\Render\RendererInterface $renderer: The renderer interface.

bool $is_xml_http_request: TRUE if the request is a XMLHttpRequest.

Overrides CommentDefaultFormatter::__construct

File

modules/custom/group_core_comments/src/Plugin/Field/FieldFormatter/CommentGroupContentFormatter.php, line 101

Class

CommentGroupContentFormatter
Plugin implementation of the 'comment_group_content' formatter.

Namespace

Drupal\group_core_comments\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, EntityFormBuilderInterface $entity_form_builder, RouteMatchInterface $route_match, EntityDisplayRepositoryInterface $entity_display_repository, RendererInterface $renderer, $is_xml_http_request) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $current_user, $entity_type_manager, $entity_form_builder, $route_match, $entity_display_repository);
  $this->renderer = $renderer;
  $this->isXmlHttpRequest = $is_xml_http_request;
}