public function BlockFieldWidget::__construct in Block field 8
Constructs a WidgetBase object.
Parameters
string $plugin_id: The plugin_id for the widget.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.
array $settings: The widget settings.
array $third_party_settings: Any third party settings.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ BlockFieldWidget.php, line 56
Class
- BlockFieldWidget
- Plugin implementation of the 'block_field' widget.
Namespace
Drupal\block_field\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, BlockManagerInterface $block_manager, BlockFieldSelectionManager $block_field_selection_manager, ContextRepositoryInterface $contextRepository) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->blockManager = $block_manager;
$this->blockFieldSelectionManager = $block_field_selection_manager;
$this->contextRepository = $contextRepository;
$this->blockManager = $block_manager;
}