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,40 @@
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Api\Logging;
interface EntitySaveHandlerInterface
{
/**
* Method returns specific LogEntry's data after object saving/deleting.
* @see \Amasty\AdminActionsLog\Logging\ActionType\AfterSave\Entity::prepareLogEntryData
*
* @param MetadataInterface $metadata
* @return array
*/
public function getLogMetadata(MetadataInterface $metadata): array;
/**
* Method for extracting and generating key => value array with data from concrete object
* for LogDetail entity before saving main entity.
* @see \Amasty\AdminActionsLog\Logging\ActionType\BeforeSave\Entity::execute
*
* @param $object
* @return array
*/
public function processBeforeSave($object): array;
/**
* Method for extracting and generating key => value array with data from concrete object
* for LogDetail entity after saving main entity.
* @see \Amasty\AdminActionsLog\Logging\ActionType\AfterSave\Entity::execute
*
* @param $object
* @return array
*/
public function processAfterSave($object): array;
}
@@ -0,0 +1,16 @@
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Api\Logging;
interface LoggingActionInterface
{
/**
* Perform logging action i.e. save product changes, save visit history, etc.
*/
public function execute(): void;
}
@@ -0,0 +1,51 @@
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Api\Logging;
use Magento\Framework\App\RequestInterface;
interface MetadataInterface
{
/**
* Basic event actions identifiers.
*/
public const EVENT_DISPATCH = 'dispatch';
public const EVENT_SAVE_BEFORE = 'save_before';
public const EVENT_SAVE_AFTER = 'save_after';
public const EVENT_DELETE = 'delete';
public const EVENT_LOGIN = 'login';
public const EVENT_LAYOUT_RENDER_BEFORE = 'layout_render_before';
/**
* Current action's request.
*
* @return RequestInterface
*/
public function getRequest(): RequestInterface;
/**
* Action's event name.
*
* @return string
*/
public function getEventName(): string;
/**
* Action's logging object.
*
* @return object|null
*/
public function getObject(): ?object;
/**
* Object key. It could be set while executing entities by schedule.
*
* @return string|null
*/
public function getStorageEntityKey(): ?string;
}
@@ -0,0 +1,42 @@
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Api\Logging;
interface ObjectDataStorageInterface
{
/**
* Method to retrieve stored object data.
*
* @param string $key
* @return array|null
*/
public function get(string $key): ?array;
/**
* Method to store object's data in storage.
*
* @param string $key
* @param array $data
*/
public function set(string $key, array $data): void;
/**
* Method to remove object's data from storage.
*
* @param string $key
*/
public function unset(string $key): void;
/**
* Method to to check is data persists in storage.
*
* @param string $key
* @return bool
*/
public function isExists(string $key): bool;
}