public function ImageCropWidget::__construct in Image Widget Crop 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/ImageCropWidget.php \Drupal\image_widget_crop\Plugin\Field\FieldWidget\ImageCropWidget::__construct()
Constructs an ImageWidget 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.
\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager service.
\Drupal\Core\Image\ImageFactory $image_factory: The image factory service.
Overrides ImageWidget::__construct
File
- src/
Plugin/ Field/ FieldWidget/ ImageCropWidget.php, line 66
Class
- ImageCropWidget
- Plugin implementation of the 'image_widget_crop' widget.
Namespace
Drupal\image_widget_crop\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ElementInfoManagerInterface $element_info, ImageWidgetCropManager $image_widget_crop_manager, EntityStorageInterface $image_style_storage, ConfigEntityStorageInterface $crop_type_storage, ConfigFactoryInterface $config_factory) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $element_info);
$this->imageWidgetCropManager = $image_widget_crop_manager;
$this->imageStyleStorage = $image_style_storage;
$this->cropTypeStorage = $crop_type_storage;
$this->configFactory = $config_factory;
}