Issue #2030653 followup by Eli-T: Expand ResponsiveImageMapping with methods.

8.0.x
Alex Pott 2014-03-26 17:10:52 +01:00
parent c15c6c188a
commit 2fe3785c48
1 changed files with 3 additions and 3 deletions

View File

@ -141,10 +141,10 @@ class ResponsiveImageFormatter extends ImageFormatterBase {
// Make sure that the breakpoint exists and is enabled.
// @todo add the following when breakpoint->status is added again:
// $responsive_image_mapping->breakpointGroup->breakpoints[$breakpoint_name]->status
$breakpointGroup = $responsive_image_mapping->getBreakpointGroup()->getBreakpointById($breakpoint_name);
if ($breakpointGroup) {
$breakpoint = $responsive_image_mapping->getBreakpointGroup()->getBreakpointById($breakpoint_name);
if ($breakpoint) {
// Determine the enabled multipliers.
$multipliers = array_intersect_key($multipliers, $breakpointGroup->multipliers);
$multipliers = array_intersect_key($multipliers, $breakpoint->multipliers);
foreach ($multipliers as $multiplier => $image_style) {
// Make sure the multiplier still exists.
if (!empty($image_style)) {