Guest User

Untitled

a guest
May 21st, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. $this->procudtRepository->getList($searchCriteria);
  2.  
  3. searchCriteria => [
  4. 'page_size': 3,
  5. 'current_page': 15,
  6. 'filterGroups' => [
  7. 0 => [
  8. 'filters' => [
  9. 0 => [
  10. 'field' => 'location',
  11. 'value' => '%as%',
  12. 'condition_type' => 'like'
  13. ]
  14. 1 => [
  15. 'filters' => [
  16. 0 => [
  17. 'field' => 'distance',
  18. 'value' => '100',
  19. 'condition_type' => 'lt'
  20. ]
  21. ]
  22. ]
  23. ]
  24.  
  25. public function __construct(
  26. /Namespace/Module/Model/CollectionFactory $collection
  27. ){
  28. $this->collection = $collection;
  29. }
  30.  
  31. public function execute(){
  32. $searchCriteria = $this->getRequest()->getPostValue('search_criteria');
  33. $collections = $this->collection->create()->getList($searchCriteria);
  34. return $collections;
  35. }
Add Comment
Please, Sign In to add comment