Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->procudtRepository->getList($searchCriteria);
- searchCriteria => [
- 'page_size': 3,
- 'current_page': 15,
- 'filterGroups' => [
- 0 => [
- 'filters' => [
- 0 => [
- 'field' => 'location',
- 'value' => '%as%',
- 'condition_type' => 'like'
- ]
- 1 => [
- 'filters' => [
- 0 => [
- 'field' => 'distance',
- 'value' => '100',
- 'condition_type' => 'lt'
- ]
- ]
- ]
- ]
- public function __construct(
- /Namespace/Module/Model/CollectionFactory $collection
- ){
- $this->collection = $collection;
- }
- public function execute(){
- $searchCriteria = $this->getRequest()->getPostValue('search_criteria');
- $collections = $this->collection->create()->getList($searchCriteria);
- return $collections;
- }
Add Comment
Please, Sign In to add comment