87 lines
2.9 KiB
PHP
87 lines
2.9 KiB
PHP
<?php
|
|
/**
|
|
* Plumrocket Inc.
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the End-user License Agreement
|
|
* that is available through the world-wide-web at this URL:
|
|
* http://wiki.plumrocket.net/wiki/EULA
|
|
* If you are unable to obtain it through the world-wide-web, please
|
|
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
|
*
|
|
* @package Plumrocket_CookieConsent
|
|
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
|
|
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
|
*/
|
|
|
|
namespace Plumrocket\CookieConsent\Model\Config\Source;
|
|
|
|
use Magento\Framework\Data\OptionSourceInterface;
|
|
use Magento\Framework\View\Asset\Repository;
|
|
use Plumrocket\ExtendedAdminUi\Api\ImageRadioButtonSourceInterface;
|
|
|
|
/**
|
|
* @since 1.1.0
|
|
*/
|
|
class BannerDisplayStyle implements OptionSourceInterface, ImageRadioButtonSourceInterface
|
|
{
|
|
public const POPUP = 'popup';
|
|
public const BOTTOM = 'bottom';
|
|
public const WALL = 'wall';
|
|
|
|
/**
|
|
* @var Repository
|
|
*/
|
|
private $viewAssetRepository;
|
|
|
|
/**
|
|
* ReviewPageStructure constructor.
|
|
*
|
|
* @param Repository $viewAssetRepository
|
|
*/
|
|
public function __construct(Repository $viewAssetRepository)
|
|
{
|
|
$this->viewAssetRepository = $viewAssetRepository;
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function toOptionArray(): array
|
|
{
|
|
return [
|
|
[
|
|
'value' => self::POPUP,
|
|
'label' => __('Cookie Consent Popup'),
|
|
'image' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/consent_popup.png'
|
|
),
|
|
'image2x' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/consent_popup@2x.png'
|
|
),
|
|
],
|
|
[
|
|
'value' => self::BOTTOM,
|
|
'label' => __('Bottom Cookie Banner'),
|
|
'image' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/bottom_panel.png'
|
|
),
|
|
'image2x' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/bottom_panel@2x.png'
|
|
),
|
|
],
|
|
[
|
|
'value' => self::WALL,
|
|
'label' => __('Full-Screen Cookie Wall'),
|
|
'image' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/full_screen.png'
|
|
),
|
|
'image2x' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/banner-style/full_screen@2x.png'
|
|
),
|
|
],
|
|
];
|
|
}
|
|
}
|