ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plumrocket\CookieConsent\Helper;
|
||||
|
||||
use Magento\Framework\App\Helper\AbstractHelper;
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
use Magento\Framework\Serialize\SerializerInterface;
|
||||
use Plumrocket\Base\Model\ConfigUtils;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Config extends AbstractHelper
|
||||
{
|
||||
|
||||
public const XML_PATH_IS_ENABLED = 'pr_cookie/general/enabled';
|
||||
public const XML_PATH_USE_COOKIE_BEFORE_OPT_IN = 'pr_cookie/main_settings/use_cookie_before_opt_in';
|
||||
public const XML_PATH_BLOCK_UNKNOWN_COOKIE = 'pr_cookie/main_settings/block_unknown_cookie';
|
||||
public const XML_PATH_CONSENT_EXPIRY = 'pr_cookie/main_settings/consent_expiry';
|
||||
public const XML_PATH_RELOAD_AFTER_ACCEPT = 'pr_cookie/main_settings/reload_after_accept';
|
||||
public const XML_PATH_RELOAD_AFTER_DECLINE = 'pr_cookie/main_settings/reload_after_decline';
|
||||
|
||||
public const XML_PATH_GTM_ENABLED = 'prgdpr/gtm/enabled';
|
||||
public const XML_PATH_GTM_CATEGORY_KEY = 'pr_cookie/gtm/category';
|
||||
public const XML_PATH_GTM_CONTAINER_ID = 'prgdpr/gtm/container_id';
|
||||
public const XML_PATH_GTM_SERVER_SIDE_TAGGING = 'pr_cookie/gtm/server_side_tagging';
|
||||
public const XML_PATH_GTM_SERVER_URL = 'pr_cookie/gtm/server_url';
|
||||
public const XML_PATH_GTM_CONSENT_MODE_ENABLED = 'pr_cookie/gtm/consent_mode';
|
||||
public const XML_PATH_GTM_CONSENT_TYPES = 'pr_cookie/gtm/consent_types';
|
||||
|
||||
/**
|
||||
* @var \Plumrocket\Base\Model\Utils\Config
|
||||
*/
|
||||
private $configUtils;
|
||||
|
||||
/**
|
||||
* @var SerializerInterface
|
||||
*/
|
||||
private $serializer;
|
||||
|
||||
/**
|
||||
* @param \Magento\Framework\App\Helper\Context $context
|
||||
* @param \Plumrocket\Base\Model\Utils\Config $configUtils
|
||||
* @param SerializerInterface $serializer
|
||||
*/
|
||||
public function __construct(
|
||||
Context $context,
|
||||
ConfigUtils $configUtils,
|
||||
SerializerInterface $serializer
|
||||
) {
|
||||
parent::__construct($context);
|
||||
$this->configUtils = $configUtils;
|
||||
$this->serializer = $serializer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if module is enabled.
|
||||
*
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function isModuleEnabled($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(
|
||||
self::XML_PATH_IS_ENABLED,
|
||||
$store,
|
||||
$scope
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function canUseCookieBeforeOptIn($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(
|
||||
self::XML_PATH_USE_COOKIE_BEFORE_OPT_IN,
|
||||
$store,
|
||||
$scope
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function canBlockUnknownCookie($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(
|
||||
self::XML_PATH_BLOCK_UNKNOWN_COOKIE,
|
||||
$store,
|
||||
$scope
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return int
|
||||
*/
|
||||
public function getConsentExpiry($store = null, $scope = null): int
|
||||
{
|
||||
return (int) $this->configUtils->getConfig(self::XML_PATH_CONSENT_EXPIRY, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function reloadAfterAccept($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_RELOAD_AFTER_ACCEPT, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function reloadAfterDecline($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_RELOAD_AFTER_DECLINE, $store, $scope);
|
||||
}
|
||||
|
||||
/** ------ GMT ------- */
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function isGtmEnabled($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_GTM_ENABLED, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getGmtAssociatedCategoryKey($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_GTM_CATEGORY_KEY, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getGtmContainerId($store = null, $scope = null): string
|
||||
{
|
||||
return trim((string) $this->configUtils->getConfig(self::XML_PATH_GTM_CONTAINER_ID, $store, $scope));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $store
|
||||
* @param $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function isGtmServerSideTaggingEnabled($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_GTM_SERVER_SIDE_TAGGING, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $store
|
||||
* @param $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getGtmServerBaseUrl($store = null, $scope = null): string
|
||||
{
|
||||
if (! $this->isGtmServerSideTaggingEnabled($store, $scope)) {
|
||||
return 'https://www.googletagmanager.com';
|
||||
}
|
||||
|
||||
return trim((string) $this->configUtils->getConfig(self::XML_PATH_GTM_SERVER_URL, $store, $scope), ' \/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if gtm consent mode enabled
|
||||
*
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function isGtmConsentModeEnabled($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_GTM_CONSENT_MODE_ENABLED, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve gtm consent types configurations
|
||||
*
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getGtmConsentTypesConfig($store = null, $scope = null): array
|
||||
{
|
||||
$config = $this->configUtils->getConfig(self::XML_PATH_GTM_CONSENT_TYPES, $store, $scope);
|
||||
if (is_string($config)) {
|
||||
$config = $this->serializer->unserialize($config);
|
||||
}
|
||||
return $config ?: [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plumrocket\CookieConsent\Helper\Config;
|
||||
|
||||
use Magento\Framework\App\Helper\AbstractHelper;
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
use Plumrocket\Base\Api\ConfigUtilsInterface;
|
||||
use Plumrocket\Base\Model\ConfigUtils;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class CookieNotice extends AbstractHelper
|
||||
{
|
||||
public const XML_PATH_DISPLAY_STYLE = 'pr_cookie/cookie_notice/display_style';
|
||||
public const XML_PATH_HIDE_ON_URLS = 'pr_cookie/cookie_notice/hide_on_urls';
|
||||
public const XML_PATH_TITLE = 'pr_cookie/cookie_notice/title';
|
||||
public const XML_PATH_TEXT = 'pr_cookie/cookie_notice/text';
|
||||
|
||||
public const XML_PATH_ACCEPT_BUTTON_GROUP = 'pr_cookie/cookie_notice/accept_button';
|
||||
public const XML_PATH_DECLINE_BUTTON_GROUP = 'pr_cookie/cookie_notice/decline_button';
|
||||
public const XML_PATH_SETTINGS_BUTTON_GROUP = 'pr_cookie/cookie_notice/settings_button';
|
||||
public const XML_PATH_TITLE_COLOR = 'pr_cookie/cookie_notice/title_color';
|
||||
public const XML_PATH_TEXT_COLOR = 'pr_cookie/cookie_notice/text_color';
|
||||
public const XML_PATH_BACKGROUND_COLOR = 'pr_cookie/cookie_notice/background_color';
|
||||
public const XML_PATH_OVERLAY_BACKGROUND_COLOR = 'pr_cookie/cookie_notice/overlay_background_color';
|
||||
public const XML_PATH_OVERLAY_BLUR = 'pr_cookie/cookie_notice/overlay_blur';
|
||||
|
||||
/**
|
||||
* @var \Plumrocket\Base\Model\ConfigUtils
|
||||
*/
|
||||
private $configUtils;
|
||||
|
||||
/**
|
||||
* @param \Magento\Framework\App\Helper\Context $context
|
||||
* @param \Plumrocket\Base\Model\ConfigUtils $configUtils
|
||||
*/
|
||||
public function __construct(
|
||||
Context $context,
|
||||
ConfigUtils $configUtils
|
||||
) {
|
||||
parent::__construct($context);
|
||||
$this->configUtils = $configUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayStyle($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_DISPLAY_STYLE, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getUrlsToHide($store = null, $scope = null): array
|
||||
{
|
||||
$value = (string) $this->configUtils->getConfig(self::XML_PATH_HIDE_ON_URLS, $store, $scope);
|
||||
|
||||
return array_filter($this->configUtils->splitTextareaValueByLine($value));
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_TITLE, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getText($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_TEXT, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getTitleColor($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_TITLE_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getTextColor($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_TEXT_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getBackgroundColor($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_BACKGROUND_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getOverlayBackgroundColor($store = null, $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_OVERLAY_BACKGROUND_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.1.1
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function getIsNeedBlurOverlay($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_OVERLAY_BLUR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getAcceptButtonConfig($store = null, $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_ACCEPT_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getDeclineButtonConfig($store = null, $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_DECLINE_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getSettingsButtonConfig($store = null, $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_SETTINGS_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plumrocket\CookieConsent\Helper\Config;
|
||||
|
||||
use Magento\Framework\App\Helper\AbstractHelper;
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
use Plumrocket\Base\Model\ConfigUtils;
|
||||
use Plumrocket\CookieConsent\Model\Config\Source\SettingsPanelDisplayStyle;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class SettingsBar extends AbstractHelper
|
||||
{
|
||||
public const XML_PATH_DISPLAY_STYLE = 'pr_cookie/settings_bar/display_style';
|
||||
public const XML_PATH_OVERVIEW_TITLE = 'pr_cookie/settings_bar/overview_title';
|
||||
public const XML_PATH_OVERVIEW_TEXT = 'pr_cookie/settings_bar/overview_text';
|
||||
public const XML_PATH_TEXT_COLOR = 'pr_cookie/settings_bar/text_color';
|
||||
public const XML_PATH_BACKGROUND_COLOR = 'pr_cookie/settings_bar/background_color';
|
||||
|
||||
public const XML_PATH_CONSENT_TITLE = 'pr_cookie/settings_bar/header';
|
||||
public const XML_PATH_ESSENTIAL_CATEGORY_STATUS = 'pr_cookie/settings_bar/essential_category_status';
|
||||
public const XML_PATH_SHOW_COOKIE_DETAILS = 'pr_cookie/settings_bar/show_details';
|
||||
public const XML_PATH_COOKIE_DETAILS_LINK = 'pr_cookie/settings_bar/cookie_details_link';
|
||||
|
||||
public const XML_PATH_ACCEPT_BUTTON_GROUP = 'pr_cookie/settings_bar/accept_button';
|
||||
public const XML_PATH_DECLINE_BUTTON_GROUP = 'pr_cookie/settings_bar/decline_button';
|
||||
public const XML_PATH_CONFIRM_BUTTON_GROUP = 'pr_cookie/settings_bar/confirm_button';
|
||||
|
||||
/**
|
||||
* @var \Plumrocket\Base\Model\ConfigUtils
|
||||
*/
|
||||
private $configUtils;
|
||||
|
||||
/**
|
||||
* @param \Magento\Framework\App\Helper\Context $context
|
||||
* @param \Plumrocket\Base\Model\ConfigUtils $configUtils
|
||||
*/
|
||||
public function __construct(
|
||||
Context $context,
|
||||
ConfigUtils $configUtils
|
||||
) {
|
||||
parent::__construct($context);
|
||||
$this->configUtils = $configUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve display style of panel.
|
||||
*
|
||||
* @param int|string|null $store
|
||||
* @return string
|
||||
*/
|
||||
public function getDisplayStyle($store = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getStoreConfig(self::XML_PATH_DISPLAY_STYLE, $store)
|
||||
?: SettingsPanelDisplayStyle::LEFT_BAR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get overview title.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getOverviewTitle($store = null, ?string $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_OVERVIEW_TITLE, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get overview text.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getOverviewText($store = null, ?string $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_OVERVIEW_TEXT, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get panel text color.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getTextColor($store = null, ?string $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_TEXT_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get panel background color.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getBackgroundColor($store = null, ?string $scope = null): string
|
||||
{
|
||||
return (string) $this->configUtils->getConfig(self::XML_PATH_BACKGROUND_COLOR, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Consent Settings Header.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getConsentPreferencesHeader($store = null, ?string $scope = null): string
|
||||
{
|
||||
return trim((string) $this->configUtils->getConfig(self::XML_PATH_CONSENT_TITLE, $store, $scope));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status title.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getEssentialCategoryStatus($store = null, ?string $scope = null): string
|
||||
{
|
||||
return trim((string) $this->configUtils->getConfig(self::XML_PATH_ESSENTIAL_CATEGORY_STATUS, $store, $scope));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if if can show cookie details.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function canShowCookieDetails($store = null, ?string $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_SHOW_COOKIE_DETAILS, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cookie Details Title.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getCookieDetailsLinkTitle($store = null, ?string $scope = null): string
|
||||
{
|
||||
return trim((string) $this->configUtils->getConfig(self::XML_PATH_COOKIE_DETAILS_LINK, $store, $scope));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configs for accept button.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getAcceptButtonConfig($store = null, ?string $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_ACCEPT_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configs for decline button.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getDeclineButtonConfig($store = null, ?string $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_DECLINE_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configs for confirm button.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @param string|null $scope
|
||||
* @return array
|
||||
*/
|
||||
public function getConfirmButtonConfig($store = null, ?string $scope = null): array
|
||||
{
|
||||
return (array) $this->configUtils->getConfig(self::XML_PATH_CONFIRM_BUTTON_GROUP, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get template for settings panel.
|
||||
*
|
||||
* @param string|int|null $store
|
||||
* @return string
|
||||
*/
|
||||
public function getJsComponentTemplate($store = null): string
|
||||
{
|
||||
if ($this->getDisplayStyle($store) === SettingsPanelDisplayStyle::ACCORDION_POPUP) {
|
||||
return 'Plumrocket_CookieConsent/settings/accordion-popup';
|
||||
}
|
||||
return 'Plumrocket_CookieConsent/settings/left-bar';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user