You are here

public function LanguageFormatter::__construct in Custom Language field 8

LanguageFormatter constructor.

Parameters

string $plugin_id: Plugin id.

mixed $plugin_definition: Plugin definition.

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

array $settings: Settings.

string $label: Label.

string $view_mode: View mode.

array $third_party_settings: Third party settings.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: EntityTypeManager service.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Module handler.

Overrides StringFormatter::__construct

File

src/Plugin/Field/FieldFormatter/LanguageFormatter.php, line 59

Class

LanguageFormatter
Plugin implementation of the 'language_field' formatter.

Namespace

Drupal\languagefield\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $moduleHandler) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $entity_type_manager);
  $this->moduleHandler = $moduleHandler;
}