Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SearchCriteria.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Framework\Api;
8 
14 {
18  const FILTER_GROUPS = 'filter_groups';
19  const SORT_ORDERS = 'sort_orders';
20  const PAGE_SIZE = 'page_size';
21  const CURRENT_PAGE = 'current_page';
22 
28  public function getFilterGroups()
29  {
30  $filterGroups = $this->_get(self::FILTER_GROUPS);
31  return is_array($filterGroups) ? $filterGroups : [];
32  }
33 
39  public function getSortOrders()
40  {
41  return $this->_get(self::SORT_ORDERS);
42  }
43 
49  public function getPageSize()
50  {
51  return $this->_get(self::PAGE_SIZE);
52  }
53 
59  public function getCurrentPage()
60  {
61  return $this->_get(self::CURRENT_PAGE);
62  }
63 
70  public function setFilterGroups(array $filterGroups = null)
71  {
72  return $this->setData(self::FILTER_GROUPS, $filterGroups);
73  }
74 
81  public function setSortOrders(array $sortOrders = null)
82  {
83  return $this->setData(self::SORT_ORDERS, $sortOrders);
84  }
85 
92  public function setPageSize($pageSize)
93  {
94  return $this->setData(self::PAGE_SIZE, $pageSize);
95  }
96 
103  public function setCurrentPage($currentPage)
104  {
105  return $this->setData(self::CURRENT_PAGE, $currentPage);
106  }
107 }
setSortOrders(array $sortOrders=null)
setFilterGroups(array $filterGroups=null)