ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Improved Sorting for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\Sorting\Api;
|
||||
|
||||
/**
|
||||
* Interface IndexMethodWrapper
|
||||
* @api
|
||||
*/
|
||||
interface IndexMethodWrapperInterface
|
||||
{
|
||||
/**
|
||||
* @return \Amasty\Sorting\Api\IndexedMethodInterface
|
||||
*/
|
||||
public function getSource();
|
||||
|
||||
/**
|
||||
* @return \Magento\Framework\Indexer\ActionInterface
|
||||
*/
|
||||
public function getIndexer();
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Improved Sorting for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\Sorting\Api;
|
||||
|
||||
/**
|
||||
* Interface IndexedMethodInterface
|
||||
* @api
|
||||
*/
|
||||
interface IndexedMethodInterface extends MethodInterface
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getIndexTableName();
|
||||
|
||||
/**
|
||||
* Full reindex.
|
||||
* Truncate index table, commit insert, revert on error
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function reindex();
|
||||
|
||||
/**
|
||||
* insert to index table
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function doReindex();
|
||||
|
||||
/**
|
||||
* Returns Sorting method Table Column name
|
||||
* which is using for order collection
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSortingColumnName();
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Improved Sorting for Magento 2
|
||||
*/
|
||||
namespace Amasty\Sorting\Api;
|
||||
|
||||
use Magento\Catalog\Model\ResourceModel\Product\Collection;
|
||||
|
||||
/**
|
||||
* Interface IndexedMethodInterface
|
||||
* @api
|
||||
*/
|
||||
interface MethodInterface
|
||||
{
|
||||
/**
|
||||
* Apply sorting method to collection
|
||||
*
|
||||
* @param Collection $collection
|
||||
* @param string $direction
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function apply($collection, $direction);
|
||||
|
||||
public function applyCustomAttribute(Collection $collection, string $direction): void;
|
||||
|
||||
/**
|
||||
* Returns Sorting method Code for using in code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethodCode();
|
||||
|
||||
/**
|
||||
* Returns Sorting method Name for using like Method label
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethodName();
|
||||
|
||||
/**
|
||||
* Get method label for store
|
||||
*
|
||||
* @param null|int|\Magento\Store\Model\Store $store
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethodLabel($store = null);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Improved Sorting for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\Sorting\Api;
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
interface ProductReviewLinkProcessorInterface
|
||||
{
|
||||
/**
|
||||
* @param int $productId
|
||||
* @param int $reviewId
|
||||
*/
|
||||
public function create(int $productId, int $reviewId): void;
|
||||
|
||||
/**
|
||||
* @param int $productId
|
||||
* @param int $reviewId
|
||||
*/
|
||||
public function remove(int $productId, int $reviewId): void;
|
||||
}
|
||||
Reference in New Issue
Block a user