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
+82
View File
@@ -0,0 +1,82 @@
<?php
/**
* Athlete2 Theme
*
* NOTICE OF LICENSE
*
* This source file is subject to the Olegnax.com license that is
* available through the world-wide-web at this URL:
* https://www.olegnax.com/license
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Olegnax
* @package Olegnax_Athlete2
* @copyright Copyright (c) 2023 Olegnax (http://www.olegnax.com/)
* @license https://www.olegnax.com/license
*/
namespace Olegnax\Athlete2\Block;
use Magento\Customer\Model\Context;
use Magento\Customer\Model\Url;
use Olegnax\Athlete2\Helper\Helper as HelperHelper;
class TopLinks extends SimpleTemplate
{
/**
* @var \Magento\Framework\App\Http\Context
*/
protected $httpContext;
/**
* @var Url
*/
protected $_customerUrl;
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Framework\App\Http\Context $httpContext,
Url $customerUrl,
array $data = []
) {
$this->httpContext = $httpContext;
$this->_customerUrl = $customerUrl;
parent::__construct($context, $data);
}
public function getCompareListUrl()
{
return $this->_loadObject(HelperHelper::class)->getCompareListUrl();
}
/**
* @return string
*/
public function getLoginUrl()
{
return $this->_customerUrl->getLoginUrl();
}
/**
* @return string
*/
public function getLogoutUrl()
{
return $this->_customerUrl->getLogoutUrl();
}
/**
* Is logged in
*
* @return bool
*/
public function isLoggedIn()
{
return $this->httpContext->getValue(Context::CONTEXT_AUTH);
}
}