ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
<?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\Ui\Locator;
|
||||
|
||||
use Magento\Framework\Exception\NotFoundException;
|
||||
use Magento\Framework\Model\AbstractExtensibleModel;
|
||||
use Magento\Store\Api\Data\StoreInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class AbstractContainerLocator implements LocatorInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $modelName = 'model';
|
||||
|
||||
/**
|
||||
* @var AbstractExtensibleModel
|
||||
*/
|
||||
private $model;
|
||||
|
||||
/**
|
||||
* @var StoreInterface
|
||||
*/
|
||||
private $store;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getModel(): AbstractExtensibleModel
|
||||
{
|
||||
if (null !== $this->model) {
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
throw new NotFoundException(__("The %1 wasn't registered.", $this->modelName));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getStore(): StoreInterface
|
||||
{
|
||||
if (null !== $this->store) {
|
||||
return $this->store;
|
||||
}
|
||||
|
||||
throw new NotFoundException(__("The store wasn't registered. Verify the store and try again."));
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setModel(AbstractExtensibleModel $model): LocatorInterface
|
||||
{
|
||||
$this->model = $model;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setStore(StoreInterface $store): LocatorInterface
|
||||
{
|
||||
$this->store = $store;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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\Ui\Locator;
|
||||
|
||||
use Plumrocket\CookieConsent\Api\Data\CategoryInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class CategoryContainerLocator extends AbstractContainerLocator implements CategoryLocatorInterface
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getCategory(): CategoryInterface
|
||||
{
|
||||
return $this->getModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setCategory(CategoryInterface $category): CategoryLocatorInterface
|
||||
{
|
||||
$this->setModel($category);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Ui\Locator;
|
||||
|
||||
use Plumrocket\CookieConsent\Api\Data\CategoryInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CategoryLocatorInterface extends LocatorInterface
|
||||
{
|
||||
/**
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
* @throws \Magento\Framework\Exception\NotFoundException
|
||||
*/
|
||||
public function getCategory(): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CategoryInterface $category
|
||||
* @return \Plumrocket\CookieConsent\Ui\Locator\CategoryLocatorInterface
|
||||
*/
|
||||
public function setCategory(CategoryInterface $category): CategoryLocatorInterface;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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\Ui\Locator;
|
||||
|
||||
use Plumrocket\CookieConsent\Api\Data\CookieInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class CookieContainerLocator extends AbstractContainerLocator implements CookieLocatorInterface
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getCookie(): CookieInterface
|
||||
{
|
||||
return $this->getModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setCookie(CookieInterface $cookie): CookieLocatorInterface
|
||||
{
|
||||
$this->setModel($cookie);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Ui\Locator;
|
||||
|
||||
use Plumrocket\CookieConsent\Api\Data\CookieInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CookieLocatorInterface extends LocatorInterface
|
||||
{
|
||||
/**
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
* @throws \Magento\Framework\Exception\NotFoundException
|
||||
*/
|
||||
public function getCookie(): CookieInterface;
|
||||
|
||||
/**
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CookieInterface $category
|
||||
* @return \Plumrocket\CookieConsent\Ui\Locator\CookieLocatorInterface
|
||||
*/
|
||||
public function setCookie(CookieInterface $category): CookieLocatorInterface;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Ui\Locator;
|
||||
|
||||
use Magento\Framework\Model\AbstractExtensibleModel;
|
||||
use Magento\Store\Api\Data\StoreInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface LocatorInterface
|
||||
{
|
||||
/**
|
||||
* Get category or cookie model.
|
||||
*
|
||||
* @return \Magento\Framework\Model\AbstractExtensibleModel
|
||||
* @throws \Magento\Framework\Exception\NotFoundException
|
||||
*/
|
||||
public function getModel(): AbstractExtensibleModel;
|
||||
|
||||
/**
|
||||
* Set category or cookie model.
|
||||
*
|
||||
* @param \Magento\Framework\Model\AbstractExtensibleModel $model
|
||||
* @return \Plumrocket\CookieConsent\Ui\Locator\LocatorInterface
|
||||
*/
|
||||
public function setModel(AbstractExtensibleModel $model): LocatorInterface;
|
||||
|
||||
/**
|
||||
* Get current store.
|
||||
*
|
||||
* @return \Magento\Store\Api\Data\StoreInterface
|
||||
* @throws \Magento\Framework\Exception\NotFoundException
|
||||
*/
|
||||
public function getStore(): StoreInterface;
|
||||
|
||||
/**
|
||||
* Set current store.
|
||||
*
|
||||
* @param \Magento\Store\Api\Data\StoreInterface $store
|
||||
* @return \Plumrocket\CookieConsent\Ui\Locator\LocatorInterface
|
||||
*/
|
||||
public function setStore(StoreInterface $store): LocatorInterface;
|
||||
}
|
||||
Reference in New Issue
Block a user