You are here

public function PrivateMessageThreadMemberFormatter::__construct in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldFormatter/PrivateMessageThreadMemberFormatter.php \Drupal\private_message\Plugin\Field\FieldFormatter\PrivateMessageThreadMemberFormatter::__construct()

Construct a PrivateMessageThreadFormatter object.

Parameters

string $plugin_id: The ID of the plugin.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $settings: The field settings.

mixed $label: The label of the field.

string $view_mode: The current view mode.

array $third_party_settings: The third party settings.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity manager service.

|Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.

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

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/PrivateMessageThreadMemberFormatter.php, line 75

Class

PrivateMessageThreadMemberFormatter
Defines the private message member field formatter.

Namespace

Drupal\private_message\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityTypeManagerInterface $entityTypeManager, AccountProxyInterface $currentUser, EntityDisplayRepositoryInterface $entity_display_repository) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->entityTypeManager = $entityTypeManager;
  $this->currentUser = $currentUser;
  $this->entityDisplayRepository = $entity_display_repository;
}