fond-of-oryx / erp-delivery-note-page-search
ERP发货单页面搜索模块
Requires
- php: >=8.0
- fond-of-oryx/erp-delivery-note: ^2.4.0
- fond-of-oryx/erp-delivery-note-page-search-extension: ^1.0.0
- fond-of-oryx/erp-delivery-note-permission: ^1.0.0 || ^2.0.0
- spryker/customer: ^7.0.0
- spryker/publisher-extension: ^1.0.0
- spryker/search: ^8.0.0
- spryker/search-elasticsearch: ^1.0.0
- spryker/synchronization-behavior: ^1.0.0
- spryker/synchronization-extension: ^1.0.0
Requires (Dev)
README
安装
composer require fond-of-oryx/erp-delivery-note-page-search
配置
对于如 GET {{glue_uri}}/erp-delivery-note-page-search?page[offset]=0&;page[limit]=12&;company-business-unit-uuid[]={{external_company_business_unit_reference}}&;external-reference[]={{external_reference1}}&;external-reference[]={{external_reference2}}
的搜索,注册 ErpDeliveryNotePageSearchOwnParamFilterQueryExpanderPlugin
作为扩展插件。对于带有spryker筛选器的搜索,如 GET {{glue_uri}}/erp-delivery-note-page-search?page[offset]=0&;page[limit]=12&;filter[company-business-unit.uuid]={{external_company_business_unit_reference}}&;filter[erp-delivery-note.external-reference]={{external_reference}}
,注册 ErpDeliveryNotePageSearchExternalReferenceFilterQueryExpanderPlugin
和 ErpDeliveryNotePageSearchCompanyBusinessUnitUuidFilterQueryExpanderPlugin
作为扩展插件
注册 RawErpDeliveryNotePageSearchResultFormatterPlugin
作为结果格式化插件
<?php
namespace Pyz\Client\ErpDeliveryNotePageSearch;
use FondOfOryx\Client\ErpDeliveryNotePageSearch\ErpDeliveryNotePageSearchDependencyProvider as FooErpDeliveryNotePageSearchDependencyProvider;
use FondOfOryx\Client\ErpDeliveryNotePageSearch\Plugin\SearchExtension\ErpDeliveryNotePageSearchOwnParamFilterQueryExpanderPlugin;
use FondOfOryx\Client\ErpDeliveryNotePageSearch\Plugin\SearchExtension\RawErpDeliveryNotePageSearchResultFormatterPlugin;
class ErpDeliveryNotePageSearchDependencyProvider extends FooErpDeliveryNotePageSearchDependencyProvider
{
/**
* @return \Spryker\Client\Search\Dependency\Plugin\QueryExpanderPluginInterface[]
*/
protected function getQueryExpanderPlugins(): array
{
$queryExpanderPlugins = parent::getQueryExpanderPlugins();
$queryExpanderPlugins[] = new ErpDeliveryNotePageSearchOwnParamFilterQueryExpanderPlugin();
return $queryExpanderPlugins;
}
/**
* @return \Spryker\Client\Search\Dependency\Plugin\ResultFormatterPluginInterface[]
*/
protected function getResultFormatterPlugins(): array
{
$resultFormatterPlugins = parent::getResultFormatterPlugins();
$resultFormatterPlugins[] = new RawErpDeliveryNotePageSearchResultFormatterPlugin();
return $resultFormatterPlugins;
}
}