ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Api;
|
||||
|
||||
/**
|
||||
* Check if we can manage cookie for current guest/customer by location
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CanManageCookieInterface
|
||||
{
|
||||
/**
|
||||
* GeoIPLookup will extend this method
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function execute(): bool;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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\Api;
|
||||
|
||||
use Magento\Framework\Api\SearchCriteriaInterface;
|
||||
use Magento\Framework\Api\SearchResultsInterface;
|
||||
use Plumrocket\CookieConsent\Api\Data\CategoryInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CategoryRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Get info about category by category key
|
||||
*
|
||||
* @param string $categoryKey
|
||||
* @param int|null $storeId
|
||||
* @param bool $forceReload
|
||||
* @return CategoryInterface
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
*/
|
||||
public function get(string $categoryKey, ?int $storeId = null, bool $forceReload = false): CategoryInterface;
|
||||
|
||||
/**
|
||||
* Get category list
|
||||
*
|
||||
* @param SearchCriteriaInterface $searchCriteria
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategorySearchResultsInterface
|
||||
*/
|
||||
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface;
|
||||
|
||||
/**
|
||||
* Get info about category by category id
|
||||
*
|
||||
* @param int $categoryId
|
||||
* @param int|null $storeId
|
||||
* @param bool $forceReload
|
||||
* @return CategoryInterface
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
*/
|
||||
public function getById(int $categoryId, ?int $storeId = null, bool $forceReload = false): CategoryInterface;
|
||||
|
||||
/**
|
||||
* Create cookie category
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CategoryInterface $category
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
* @throws \Magento\Framework\Exception\InputException
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
* @throws \Magento\Framework\Exception\CouldNotSaveException
|
||||
*/
|
||||
public function save(CategoryInterface $category): CategoryInterface;
|
||||
|
||||
/**
|
||||
* Delete category
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CategoryInterface $category
|
||||
* @return bool Will returned True if deleted
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
*/
|
||||
public function delete(CategoryInterface $category): bool;
|
||||
|
||||
/**
|
||||
* Delete category by id.
|
||||
*
|
||||
* @param int $id
|
||||
* @return bool Will returned True if deleted
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
*/
|
||||
public function deleteById(int $id): bool;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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\Api;
|
||||
|
||||
use Magento\Framework\Api\SearchCriteriaInterface;
|
||||
use Magento\Framework\Api\SearchResultsInterface;
|
||||
use Plumrocket\CookieConsent\Api\Data\CookieInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CookieRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Get info about cookie by name
|
||||
*
|
||||
* @param string $name
|
||||
* @param int|null $storeId
|
||||
* @param bool $forceReload
|
||||
* @return CookieInterface
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
*/
|
||||
public function get(string $name, ?int $storeId = null, bool $forceReload = false): CookieInterface;
|
||||
|
||||
/**
|
||||
* Get category list
|
||||
*
|
||||
* @param SearchCriteriaInterface $searchCriteria
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieSearchResultsInterface
|
||||
*/
|
||||
public function getList(SearchCriteriaInterface $searchCriteria): SearchResultsInterface;
|
||||
|
||||
/**
|
||||
* Get info about cookie by id
|
||||
*
|
||||
* @param int $cookieId
|
||||
* @param int|null $storeId
|
||||
* @param bool $forceReload
|
||||
* @return CookieInterface
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
*/
|
||||
public function getById(int $cookieId, ?int $storeId = null, bool $forceReload = false): CookieInterface;
|
||||
|
||||
/**
|
||||
* Create or update cookie
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CookieInterface $cookie
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
* @throws \Magento\Framework\Exception\InputException
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
* @throws \Magento\Framework\Exception\CouldNotSaveException
|
||||
*/
|
||||
public function save(CookieInterface $cookie): CookieInterface;
|
||||
|
||||
/**
|
||||
* Delete cookie
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CookieInterface $cookie
|
||||
* @return bool Will returned True if deleted
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
*/
|
||||
public function delete(CookieInterface $cookie): bool;
|
||||
|
||||
/**
|
||||
* Delete cookie by id.
|
||||
*
|
||||
* @param int $id
|
||||
* @return bool Will returned True if deleted
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
* @throws \Magento\Framework\Exception\StateException
|
||||
*/
|
||||
public function deleteById(int $id): bool;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
<?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\Api\Data;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CategoryInterface
|
||||
{
|
||||
public const DATA_PERSISTOR_KEY = 'pr-cookie-category';
|
||||
public const ALL_CATEGORIES = 'all';
|
||||
|
||||
public const STATUS = 'status';
|
||||
public const IS_PRE_CHECKED = 'is_pre_checked';
|
||||
public const IS_ESSENTIAL = 'is_essential';
|
||||
public const KEY = 'key';
|
||||
public const NAME = 'name';
|
||||
public const DESCRIPTION = 'description';
|
||||
public const SORT_ORDER = 'sort_order';
|
||||
public const HEAD_SCRIPTS = 'head_scripts';
|
||||
public const FOOTER_MISCELLANEOUS_HTML = 'footer_miscellaneous_html';
|
||||
public const CREATED_AT = 'created_at';
|
||||
public const UPDATED_AT = 'updated_at';
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
/**
|
||||
* Set id.
|
||||
*
|
||||
* @param int $value
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setId($value);
|
||||
|
||||
/**
|
||||
* Check if category is enabled.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool;
|
||||
|
||||
/**
|
||||
* Set status.
|
||||
*
|
||||
* @param bool $status
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setStatus(bool $status): CategoryInterface;
|
||||
|
||||
/**
|
||||
* Defined if category is enabled by default in settings panel.
|
||||
*
|
||||
* If category is "pre-checked" it means that when customer open settings panel in first time,
|
||||
* this category will be checked as enabled but its only view.
|
||||
* This feature was being added for encourage customer to accept more cookie categories.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPreChecked(): bool;
|
||||
|
||||
/**
|
||||
* @param bool $flag
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setIsPreChecked(bool $flag): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEssential(): bool;
|
||||
|
||||
/**
|
||||
* @param bool $isEssential
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setIsEssential(bool $isEssential): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getKey(): string;
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setKey(string $key): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setName(string $name): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string;
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setDescription(string $description): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSortOrder(): int;
|
||||
|
||||
/**
|
||||
* @param int $sortOrder
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setSortOrder(int $sortOrder): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHeadScripts(): string;
|
||||
|
||||
/**
|
||||
* @param string $headScripts
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setHeadScripts(string $headScripts): CategoryInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFooterMiscellaneousHtml(): string;
|
||||
|
||||
/**
|
||||
* @param string $footerMiscellaneousHtml
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface
|
||||
*/
|
||||
public function setFooterMiscellaneousHtml(string $footerMiscellaneousHtml): CategoryInterface;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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\Api\Data;
|
||||
|
||||
use Magento\Framework\Api\SearchResultsInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CategorySearchResultsInterface extends SearchResultsInterface
|
||||
{
|
||||
/**
|
||||
* Get cookie list.
|
||||
*
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CategoryInterface[]
|
||||
*/
|
||||
public function getItems() : array;
|
||||
|
||||
/**
|
||||
* Set cookie list.
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CategoryInterface[] $items
|
||||
* @return $this
|
||||
*/
|
||||
public function setItems(array $items) : self;
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?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\Api\Data;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface ConsentLogInterface
|
||||
{
|
||||
public const DATA_PERSISTOR_KEY = 'pr-cookie-consent-log';
|
||||
|
||||
public const GUEST_EMAIL = 'guest_email';
|
||||
public const CUSTOMER_ID = 'customer_id';
|
||||
public const WEBSITE_ID = 'website_id';
|
||||
public const SETTINGS = 'settings';
|
||||
public const CREATED_AT = 'created_at';
|
||||
public const IP_ADDRESS = 'ip_address';
|
||||
public const USER_AGENT = 'user_agent';
|
||||
public const URL = 'url';
|
||||
|
||||
/**
|
||||
* Get log id.
|
||||
*
|
||||
* @return int|string|null
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
/**
|
||||
* Set log id.
|
||||
*
|
||||
* @param int $value
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setId($value);
|
||||
|
||||
/**
|
||||
* Return 0 for guests consent
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCustomerId(): int;
|
||||
|
||||
/**
|
||||
* Return empty string for customers consent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGuestEmail(): string;
|
||||
|
||||
/**
|
||||
* Get website id.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getWebsiteId(): int;
|
||||
|
||||
/**
|
||||
* List of allowed categories or *
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSettings(): array;
|
||||
|
||||
/**
|
||||
* Get visitor IP address.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getIpAddress(): string;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCreatedAt(): string;
|
||||
|
||||
/**
|
||||
* Get visitor User Agent
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUserAgent(): string;
|
||||
|
||||
/**
|
||||
* Get the visitor viewed url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl(): string;
|
||||
|
||||
/**
|
||||
* @param int $customerId
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setCustomerId(int $customerId): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param string $guestEmail
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setGuestEmail(string $guestEmail): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param int $websiteId
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setWebsiteId(int $websiteId): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param array $settings
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setSettings(array $settings): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param string $ipAddress
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setIpAddress(string $ipAddress): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param string $gmtDateTime
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setCreatedAt(string $gmtDateTime): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param string $userAgent
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setUserAgent(string $userAgent): ConsentLogInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\ConsentLogInterface
|
||||
*/
|
||||
public function setUrl(string $url): ConsentLogInterface;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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\Api\Data;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CookieInterface
|
||||
{
|
||||
public const DATA_PERSISTOR_KEY = 'pr-cookie-item';
|
||||
|
||||
public const NAME = 'name';
|
||||
public const CATEGORY_KEY = 'category_key';
|
||||
public const DESCRIPTION = 'description';
|
||||
public const DOMAIN = 'domain';
|
||||
public const DURATION = 'duration';
|
||||
public const TYPE = 'type';
|
||||
|
||||
/**
|
||||
* Get cookie name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string;
|
||||
|
||||
/**
|
||||
* Set cookie name.
|
||||
*
|
||||
* @param string $name
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setName(string $name): CookieInterface;
|
||||
|
||||
/**
|
||||
* Get category key.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCategoryKey(): string;
|
||||
|
||||
/**
|
||||
* Set category key.
|
||||
*
|
||||
* @param string $categoryKey
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setCategoryKey(string $categoryKey): CookieInterface;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isFirstParty(): bool;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setType(string $type): CookieInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDomain(): string;
|
||||
|
||||
/**
|
||||
* @param string $domain
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setDomain(string $domain): CookieInterface;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDuration(): int;
|
||||
|
||||
/**
|
||||
* @param int $duration
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setDuration(int $duration): CookieInterface;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription(): string;
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface
|
||||
*/
|
||||
public function setDescription(string $description): CookieInterface;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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\Api\Data;
|
||||
|
||||
use Magento\Framework\Api\SearchResultsInterface;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface CookieSearchResultsInterface extends SearchResultsInterface
|
||||
{
|
||||
/**
|
||||
* Get cookie list.
|
||||
*
|
||||
* @return \Plumrocket\CookieConsent\Api\Data\CookieInterface[]
|
||||
*/
|
||||
public function getItems() : array;
|
||||
|
||||
/**
|
||||
* Set cookie list.
|
||||
*
|
||||
* @param \Plumrocket\CookieConsent\Api\Data\CookieInterface[] $items
|
||||
* @return $this
|
||||
*/
|
||||
public function setItems(array $items) : self;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* Retrieve category id by its key
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface GetCategoryIdByKeyInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Get category id by its key.
|
||||
*
|
||||
* @param string $key
|
||||
* @param bool $forceReload
|
||||
* @return int
|
||||
*/
|
||||
public function execute(string $key, bool $forceReload = false): int;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* Retrieve cookie id by its name
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface GetCookieIdByNameInterface
|
||||
{
|
||||
/**
|
||||
* Get cookie id by name.
|
||||
*
|
||||
* @param string $name
|
||||
* @param bool $forceReload
|
||||
* @return int
|
||||
*/
|
||||
public function execute(string $name, bool $forceReload = false): int;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* Retrieve mapping in followed format:
|
||||
* [
|
||||
* <cookie_name1> => <category_key1>,
|
||||
* <cookie_name2> => <category_key1>,
|
||||
* <cookie_name3> => <category_key2>,
|
||||
* ]
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface GetCookieToCategoryMappingInterface
|
||||
{
|
||||
/**
|
||||
* Get mapping.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function execute(): array;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* Retrieve list of category keys with is allowed to use
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface GetEssentialCategoryKeysInterface
|
||||
{
|
||||
/**
|
||||
* Get essential categories.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function execute(): array;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface GetUserConsentInterface
|
||||
{
|
||||
|
||||
public const COOKIE_CONSENT_NAME = 'pr-cookie-consent';
|
||||
|
||||
/**
|
||||
* Get user consent.
|
||||
*
|
||||
* @return string[]
|
||||
* @throws \Magento\Framework\Exception\NotFoundException if user haven't consent
|
||||
*/
|
||||
public function execute(): array;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Api;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IsAllowedCategoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Is allowed category.
|
||||
*
|
||||
* @param string $key
|
||||
* @return bool
|
||||
*/
|
||||
public function execute(string $key): bool;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
namespace Plumrocket\CookieConsent\Api;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IsAllowedCookieInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Is allowed cookie.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function execute(string $name): bool;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IsUserOptInInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Is user opt in.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function execute(): bool;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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\Api;
|
||||
|
||||
/**
|
||||
* Retrieve known cookies name and their information
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface KnownCookieRegistryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Get list of know cookies.
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
public function getList(): array;
|
||||
}
|
||||
Reference in New Issue
Block a user