ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?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'
|
||||
),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user