1 | <?php |
||
24 | class CropEffect extends ConfigurableImageEffectBase implements ContainerFactoryPluginInterface { |
||
25 | |||
26 | /** |
||
27 | * Crop entity storage. |
||
28 | * |
||
29 | * @var \Drupal\crop\CropStorageInterface |
||
30 | */ |
||
31 | protected $storage; |
||
32 | |||
33 | /** |
||
34 | * Crop type entity storage. |
||
35 | * |
||
36 | * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface |
||
37 | */ |
||
38 | protected $typeStorage; |
||
39 | |||
40 | /** |
||
41 | * Crop entity. |
||
42 | * |
||
43 | * @var \Drupal\crop\CropInterface |
||
44 | */ |
||
45 | protected $crop; |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger, CropStorageInterface $crop_storage, ConfigEntityStorageInterface $crop_type_storage) { |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function transformDimensions(array &$dimensions, $uri) { |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function applyEffect(ImageInterface $image) { |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function getSummary() { |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function defaultConfiguration() { |
||
132 | |||
133 | /** |
||
134 | * {@inheritdoc} |
||
135 | */ |
||
136 | public function buildConfigurationForm(array $form, FormStateInterface $form_state) { |
||
152 | |||
153 | /** |
||
154 | * {@inheritdoc} |
||
155 | */ |
||
156 | public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { |
||
160 | |||
161 | /** |
||
162 | * Gets crop entity for the image. |
||
163 | * |
||
164 | * @param ImageInterface $image |
||
165 | * Image object. |
||
166 | * |
||
167 | * @return \Drupal\Core\Entity\EntityInterface|\Drupal\crop\CropInterface|FALSE |
||
168 | * Crop entity or FALSE if crop doesn't exist. |
||
169 | */ |
||
170 | protected function getCrop(ImageInterface $image) { |
||
173 | |||
174 | /** |
||
175 | * Gets crop entity for the given URI. |
||
176 | * |
||
177 | * @param $uri |
||
178 | * URI of the image |
||
179 | * |
||
180 | * @return bool|\Drupal\Core\Entity\EntityInterface|\Drupal\crop\CropInterface|FALSE |
||
181 | * Crop entity or FALSE if crop doesn't exist |
||
182 | */ |
||
183 | protected function getCropFromUri($uri) { |
||
193 | |||
194 | } |
||
195 |
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..