69 lines
2.0 KiB
PHP
69 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* @package Plumrocket_CookieConsent
|
|
* @copyright Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
|
|
* @license https://plumrocket.com/license End-user License Agreement
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Plumrocket\CookieConsent\Model\Config\Source;
|
|
|
|
use Magento\Framework\Data\OptionSourceInterface;
|
|
use Magento\Framework\View\Asset\Repository;
|
|
use Plumrocket\ExtendedAdminUi\Api\ImageRadioButtonSourceInterface;
|
|
|
|
/**
|
|
* @since 1.7.0
|
|
*/
|
|
class SettingsPanelDisplayStyle implements OptionSourceInterface, ImageRadioButtonSourceInterface
|
|
{
|
|
|
|
public const LEFT_BAR = 'left_bar';
|
|
public const ACCORDION_POPUP = 'accordions_popup';
|
|
|
|
/**
|
|
* @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::LEFT_BAR,
|
|
'label' => __('Left Sidebar'),
|
|
'image' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/left_bar.png'
|
|
),
|
|
'image2x' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/left_bar@2x.png'
|
|
),
|
|
],
|
|
[
|
|
'value' => self::ACCORDION_POPUP,
|
|
'label' => __('Popup'),
|
|
'image' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/popup.png'
|
|
),
|
|
'image2x' => $this->viewAssetRepository->getUrl(
|
|
'Plumrocket_CookieConsent::images/system_config/popup@2x.png'
|
|
),
|
|
],
|
|
];
|
|
}
|
|
}
|