Loading src/ImageDTO.php +1 −2 Changes for src/ImageDTO.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Drupal\photoswipe; use Drupal\media\MediaInterface; use Drupal\media_entity\MediaInterface as MediaEntityInterface; /** * Contains image item. Loading Loading @@ -99,7 +98,7 @@ class ImageDTO { $this->settings = $variables['display_settings']; // In case if entity is instance of Media use referenced field provided // specified by user. $this->item = (($item = $variables['item']) && ($item->entity instanceof MediaInterface || $item->entity instanceof MediaEntityInterface)) && $item->entity->hasField($this->settings['photoswipe_reference_image_field']) $this->item = (($item = $variables['item']) && ($item->entity instanceof MediaInterface)) && $item->entity->hasField($this->settings['photoswipe_reference_image_field']) ? $item->entity->get($this->settings['photoswipe_reference_image_field']) : $item; Loading Loading
src/ImageDTO.php +1 −2 Changes for src/ImageDTO.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Drupal\photoswipe; use Drupal\media\MediaInterface; use Drupal\media_entity\MediaInterface as MediaEntityInterface; /** * Contains image item. Loading Loading @@ -99,7 +98,7 @@ class ImageDTO { $this->settings = $variables['display_settings']; // In case if entity is instance of Media use referenced field provided // specified by user. $this->item = (($item = $variables['item']) && ($item->entity instanceof MediaInterface || $item->entity instanceof MediaEntityInterface)) && $item->entity->hasField($this->settings['photoswipe_reference_image_field']) $this->item = (($item = $variables['item']) && ($item->entity instanceof MediaInterface)) && $item->entity->hasField($this->settings['photoswipe_reference_image_field']) ? $item->entity->get($this->settings['photoswipe_reference_image_field']) : $item; Loading