...
This module contains helpers for image resize.
Table of Contents |
---|
Installation
Info |
---|
This module is required by |
...
Code Block |
---|
composer require "creativestyle/magesuite-image-resize" ^1.0.0 |
Admin settings
There is no admin setting for this module.
Backend
Note |
---|
Backend documentation need to be added |
...
Code Block |
---|
public function mapPage($page) { $imageUrl = ''; if ($page->getCmsImageTeaser()) { $imageUrl = $this->imageResize->getUrl($page->getCmsTeaserImageUrl(), self::CMS_TEASER_MODULE, self::CMS_TEASER_IMAGE_ID); } $pagesData = [ 'id' => $page->getId(), 'headline' => $page->getTitle(), 'href' => $this->cmsPageHelper->getPageUrl($page->getId()), 'image' => [ 'src' => $imageUrl, 'srcSet' => $imageUrl ? $this->imageResize->resolveSrcSet($page->getCmsTeaserImageUrl(), self::CMS_TEASER_MODULE, [self::CMS_TEASER_IMAGE_ID, self::CMS_TEASER_IMAGE_ID_2X]) : '' ], 'displayVariant' => 2 ]; return $pagesData; } |
Frontend
There are no frontend features in this module.
...