Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Backend documentation need to be added

Example of usage in magesuite-cms-tag-manager/Service/Mapper/CmsPageDataMapper.php

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.

...