1 | <?php |
||
26 | class CropEffect extends ConfigurableImageEffectBase implements ContainerFactoryPluginInterface { |
||
27 | |||
28 | /** |
||
29 | * Crop entity storage. |
||
30 | * |
||
31 | * @var \Drupal\crop\CropStorageInterface |
||
32 | */ |
||
33 | protected $storage; |
||
34 | |||
35 | /** |
||
36 | * Crop type entity storage. |
||
37 | * |
||
38 | * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface |
||
39 | */ |
||
40 | protected $typeStorage; |
||
41 | |||
42 | /** |
||
43 | * Crop entity. |
||
44 | * |
||
45 | * @var \Drupal\crop\CropInterface |
||
46 | */ |
||
47 | protected $crop; |
||
48 | |||
49 | /** |
||
50 | * The image factory service. |
||
51 | * |
||
52 | * @var \Drupal\Core\Image\ImageFactory |
||
53 | */ |
||
54 | protected $imageFactory; |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger, CropStorageInterface $crop_storage, ConfigEntityStorageInterface $crop_type_storage, ImageFactory $image_factory) { |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function applyEffect(ImageInterface $image) { |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function getSummary() { |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function defaultConfiguration() { |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function buildConfigurationForm(array $form, FormStateInterface $form_state) { |
||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { |
||
159 | |||
160 | /** |
||
161 | * Gets crop entity for the image. |
||
162 | * |
||
163 | * @param ImageInterface $image |
||
164 | * Image object. |
||
165 | * |
||
166 | * @return \Drupal\Core\Entity\EntityInterface|\Drupal\crop\CropInterface|false |
||
167 | * Crop entity or FALSE if crop doesn't exist. |
||
168 | */ |
||
169 | protected function getCrop(ImageInterface $image) { |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public function transformDimensions(array &$dimensions, $uri) { |
||
198 | |||
199 | } |
||
200 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..