You are here

public function ViewModeSelectorIcons::__construct in View Mode Selector 8

ViewModeSelectorIcons constructor.

Parameters

string $plugin_id:

mixed $plugin_definition:

\Drupal\Core\Field\FieldDefinitionInterface $field_definition:

array $settings:

array $third_party_settings:

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository:

\Drupal\Core\Render\RendererInterface $renderer:

Overrides ViewModeSelectorWidgetBase::__construct

File

src/Plugin/Field/FieldWidget/ViewModeSelectorIcons.php, line 44

Class

ViewModeSelectorIcons
Plugin annotation @FieldWidget( id = "view_mode_selector_icons", label = @Translation("Icons"), field_types = {"view_mode_selector"} )

Namespace

Drupal\view_mode_selector\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $entity_display_repository);
  $this->renderer = $renderer;
  $this->entityTypeManager = $entity_type_manager;
}