Commit 2fe3785c authored by alexpott's avatar alexpott

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

parent c15c6c18
......@@ -141,10 +141,10 @@ public function viewElements(FieldItemListInterface $items) {
// 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)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment