You are here

public function GeneralUserReferenceFormatter::__construct in Formatter Suite 8

Constructs a FormatterBase object.

Parameters

string $pluginId: The pluginId for the formatter.

mixed $pluginDefinition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: The definition of the field to which the formatter is associated.

array $settings: The formatter settings.

string $label: The formatter label display setting.

string $viewMode: The view mode.

array $thirdPartySettings: Any third party settings.

\Drupal\Core\Utility\Token $tokenService: The token replacement service.

\Drupal\token\TreeBuilder|null $tokenTreeBuilder: The token selection UI builder, if the Token module is enabled.

\Drupal\Core\Config\Config $userSettings: The user module's settings.

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/GeneralUserReferenceFormatter.php, line 105

Class

GeneralUserReferenceFormatter
Formats a user entity reference as one or more links.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

public function __construct($pluginId, $pluginDefinition, FieldDefinitionInterface $fieldDefinition, array $settings, $label, $viewMode, array $thirdPartySettings, Token $tokenService, $tokenTreeBuilder, Config $userSettings) {
  parent::__construct($pluginId, $pluginDefinition, $fieldDefinition, $settings, $label, $viewMode, $thirdPartySettings);
  $this->tokenService = $tokenService;
  $this->tokenTreeBuilder = $tokenTreeBuilder;
  $this->userSettings = $userSettings;
}