ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
namespace Olegnax\InfiniteScroll\Plugin\Frontend\Mageplaza\AjaxLayer\Helper;
use Magento\Framework\App\Request\Http;
use Olegnax\InfiniteScroll\Helper\Helper;
use Olegnax\InfiniteScroll\Plugin\Ajax;
class Data
{
/**
* @var Http
*/
protected $request;
/**
* @var Helper
*/
protected $helper;
/**
* Data constructor.
* @param Helper $helper
* @param Http $request
*/
public function __construct(
Helper $helper,
Http $request
) {
$this->helper = $helper;
$this->request = $request;
}
/**
* @param \Mageplaza\AjaxLayer\Helper\Data $subject
* @param bool $result
* @return bool
*/
public function afterAjaxEnabled(
\Mageplaza\AjaxLayer\Helper\Data $subject,
$result
) {
return $result && !$this->isAjax();
}
/**
* @return bool
*/
protected function isAjax()
{
return $this->helper->isEnabled() &&
$this->request->isXmlHttpRequest() &&
$this->request->isAjax() &&
$this->request->getParam(Ajax::AJAX_ATTR, '');
}
}