public function SocialPrivateMessageMemberFormatter::__construct in Open Social 8
Construct a PrivateMessageThreadFormatter object.
@internal param $ |Drupal\Core\Session\AccountProxyInterface $currentUser The current user.
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\Core\Entity\EntityManagerInterface $entityManager: The entity manager service.
\Drupal\Core\Session\AccountProxyInterface $currentUser: The current logged in user.
Overrides FormatterBase::__construct
File
- modules/
social_features/ social_private_message/ src/ Plugin/ Field/ Fieldformatter/ SocialPrivateMessageMemberFormatter.php, line 67
Class
- SocialPrivateMessageMemberFormatter
- Class SocialPrivateMessageMemberFormatter.
Namespace
Drupal\social_private_message\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityManagerInterface $entityManager, AccountProxyInterface $currentUser) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->entityManager = $entityManager;
$this->currentUser = $currentUser;
}