You are here

public function BlockIdFormatter::__construct in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  2. 8.2 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  3. 8.3 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  4. 8.4 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  5. 8.5 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  6. 8.6 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  7. 8.7 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  8. 8.8 modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  9. 10.3.x modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  10. 10.0.x modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  11. 10.1.x modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()
  12. 10.2.x modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php \Drupal\social_landing_page\Plugin\Field\FieldFormatter\BlockIdFormatter::__construct()

Construct a BlockIdFormatter 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\Render\RendererInterface $renderer: The renderer service.

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

Overrides FormatterBase::__construct

File

modules/social_features/social_landing_page/src/Plugin/Field/FieldFormatter/BlockIdFormatter.php, line 65

Class

BlockIdFormatter
Plugin implementation of the 'block_field' formatter.

Namespace

Drupal\social_landing_page\Plugin\Field\FieldFormatter

Code

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