diff --git a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php index bec62ed..bceb596 100644 --- a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php @@ -181,43 +181,9 @@ public function validate(array $form, FormStateInterface $form_state) { // Remove the image style mappings since the breakpoint ID has changed. $form_state->unsetValue('keyed_styles'); } - else { - $styles = $form_state->getValue('keyed_styles'); - foreach ($styles as $breakpoint_id => $multiplier_styles) { - foreach ($multiplier_styles as $multiplier => $style) { - if ($style['image_mapping_type'] == 'sizes') { - $form_state->setValue( - array( - 'keyed_styles', - $breakpoint_id, - $multiplier, - 'image_mapping', - ), - array( - 'sizes_image_styles' => array_filter($style['sizes_image_styles']), - 'sizes' => $style['sizes'], - ) - ); - } - elseif ($style['image_mapping_type'] != 'image_style') { - $form_state->unsetValue( - array('keyed_styles', $breakpoint_id, $multiplier) - ); - } - $form_state->unsetValue( - array( - 'keyed_styles', - $breakpoint_id, - $multiplier, - 'sizes_image_styles', - ) - ); - $form_state->unsetValue( - array('keyed_styles', $breakpoint_id, $multiplier, 'sizes') - ); - } - } - } + // @todo Filter 'sizes_image_styles' to a normal array in + // https://www.drupal.org/node/2334387. For an example see + // \Drupal\Core\Block\BlockBase::validateConfigurationForm(). } }