@@ -107,7 +107,7 @@ |
||
| 107 | 107 | */ |
| 108 | 108 | public static function getCropTypeNames() { |
| 109 | 109 | return array_map( |
| 110 | - function ($bundle_info) { return $bundle_info['label'];}, |
|
| 110 | + function($bundle_info) { return $bundle_info['label']; }, |
|
| 111 | 111 | \Drupal::entityManager()->getBundleInfo('crop') |
| 112 | 112 | ); |
| 113 | 113 | } |
@@ -123,16 +123,16 @@ |
||
| 123 | 123 | foreach ($this->cropImageStyles as $image_style) { |
| 124 | 124 | /** @var \Drupal\image\ImageEffectInterface $effect */ |
| 125 | 125 | foreach ($image_style->getEffects() as $effect) { |
| 126 | - if (isset($effect->getConfiguration()['data']['crop_type'])) { |
|
| 127 | - $crop_type = $effect->getConfiguration()['data']['crop_type']; |
|
| 128 | - if ($crop_type == $entity->id()) { |
|
| 129 | - // Add two image styles into the usage list. |
|
| 130 | - if (count($image_styles) < 2) { |
|
| 131 | - $usage[] = $image_style->link(); |
|
| 132 | - } |
|
| 133 | - $image_styles[] = $image_style; |
|
| 134 | - } |
|
| 135 | - } |
|
| 126 | + if (isset($effect->getConfiguration()['data']['crop_type'])) { |
|
| 127 | + $crop_type = $effect->getConfiguration()['data']['crop_type']; |
|
| 128 | + if ($crop_type == $entity->id()) { |
|
| 129 | + // Add two image styles into the usage list. |
|
| 130 | + if (count($image_styles) < 2) { |
|
| 131 | + $usage[] = $image_style->link(); |
|
| 132 | + } |
|
| 133 | + $image_styles[] = $image_style; |
|
| 134 | + } |
|
| 135 | + } |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |