ltsecurityinc安防产品在线商城代码
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Olegnax All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Olegnax\NewsletterPopupBasic\Helper;
|
||||
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
use Olegnax\Core\Helper\Helper as CoreHelperHelper;
|
||||
|
||||
class Helper extends CoreHelperHelper
|
||||
{
|
||||
const CONFIG_MODULE = 'olegnax_newsletterpopupbasic';
|
||||
const TPL_PATH_LAYOUT = "Olegnax_NewsletterPopupBasic::popup/%s.phtml";
|
||||
const XML_PATH_ENABLE = 'general/enable';
|
||||
const XML_PATH_LAYOUT = 'general/layout';
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return (bool)$this->getModuleConfig(static::XML_PATH_ENABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function setLayout()
|
||||
{
|
||||
return sprintf(
|
||||
static::TPL_PATH_LAYOUT,
|
||||
$this->getModuleConfig(static::XML_PATH_LAYOUT)
|
||||
);
|
||||
}
|
||||
|
||||
public function isLegacyCookies() {
|
||||
return $this->getVersionCompare('2.4.4-p1') || $this->getVersionCompare('2.4.4');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user