You are here

public function FieldDownloadCount::__construct in Open Social 10.3.x

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

FieldDownloadCount constructor.

Parameters

string $plugin_id: The plugin id.

array $plugin_definition: The plugin definition.

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

array $settings: The settings array.

string $label: The formatter label display setting.

string $view_mode: The view mode.

array $third_party_settings: Any third party settings.

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.

Overrides FormatterBase::__construct

File

modules/custom/download_count/src/Plugin/Field/FieldFormatter/FieldDownloadCount.php, line 64

Class

FieldDownloadCount
The FieldDownloadCount class.

Namespace

Drupal\download_count\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, array $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountProxyInterface $current_user, ThemeManagerInterface $theme_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->currentUser = $current_user;
  $this->themeManager = $theme_manager;
}