Issue #2030653 followup by Eli-T: Expand ResponsiveImageMapping with methods.
parent
c15c6c188a
commit
2fe3785c48
|
@ -141,10 +141,10 @@ class ResponsiveImageFormatter extends ImageFormatterBase {
|
||||||
// Make sure that the breakpoint exists and is enabled.
|
// Make sure that the breakpoint exists and is enabled.
|
||||||
// @todo add the following when breakpoint->status is added again:
|
// @todo add the following when breakpoint->status is added again:
|
||||||
// $responsive_image_mapping->breakpointGroup->breakpoints[$breakpoint_name]->status
|
// $responsive_image_mapping->breakpointGroup->breakpoints[$breakpoint_name]->status
|
||||||
$breakpointGroup = $responsive_image_mapping->getBreakpointGroup()->getBreakpointById($breakpoint_name);
|
$breakpoint = $responsive_image_mapping->getBreakpointGroup()->getBreakpointById($breakpoint_name);
|
||||||
if ($breakpointGroup) {
|
if ($breakpoint) {
|
||||||
// Determine the enabled multipliers.
|
// Determine the enabled multipliers.
|
||||||
$multipliers = array_intersect_key($multipliers, $breakpointGroup->multipliers);
|
$multipliers = array_intersect_key($multipliers, $breakpoint->multipliers);
|
||||||
foreach ($multipliers as $multiplier => $image_style) {
|
foreach ($multipliers as $multiplier => $image_style) {
|
||||||
// Make sure the multiplier still exists.
|
// Make sure the multiplier still exists.
|
||||||
if (!empty($image_style)) {
|
if (!empty($image_style)) {
|
||||||
|
|
Loading…
Reference in New Issue