use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\ElementInfoManagerInterface;
use Drupal\image\Plugin\Field\FieldWidget\ImageWidget;
-use Drupal\image_widget_crop\ImageWidgetCropManager;
+use Drupal\image_widget_crop\ImageWidgetCropInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\crop\Entity\CropType;
class ImageCropWidget extends ImageWidget {
/**
- * Instance of API ImageWidgetCropManager.
+ * Instance of ImageWidgetCropManager object.
*
- * @var \Drupal\image_widget_crop\ImageWidgetCropManager
+ * @var \Drupal\image_widget_crop\ImageWidgetCropInterface
*/
protected $imageWidgetCropManager;
/**
* The crop type storage.
*
- * @var \Drupal\Core\Config\Entity\ConfigEntityStorage
+ * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
*/
protected $cropTypeStorage;
/**
* {@inheritdoc}
*/
- 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) {
+ public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ElementInfoManagerInterface $element_info, ImageWidgetCropInterface $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;