Skip to content

Commit

Permalink
CO: can set page_limit & page_index in QueryParams
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeks committed Sep 8, 2017
1 parent 792bada commit 15920e2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/PrestaShopBundle/Api/QueryParamsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ public function getDefaultPageSize()
return $this->defaultPageSize;
}

/**
* @param $pageSize int
* @return $this
*/
public function setPageSize($pageSize)
{
$this->queryParams['page_size'] = (int) $pageSize;

return $this;
}

/**
* @param $pageIndex int
* @return $this
*/
public function setPageIndex($pageIndex)
{
$this->queryParams['page_index'] = (int) $pageIndex;

return $this;
}

/**
* @param Request $request
* @return $this
Expand Down

0 comments on commit 15920e2

Please sign in to comment.