/**
  * {@inheritDoc}
  */
 public function build(Request $request = null)
 {
     if (null === $request) {
         if (null === ($request = $this->requestStack->getCurrentRequest())) {
             return null;
         }
     }
     $page = $this->extractValue($request, $this->pageKey);
     $itemsPerPage = $this->extractValue($request, $this->itemsPerPageKey);
     if (is_null($page) && is_null($itemsPerPage)) {
         return null;
     }
     $paginationInfo = new PaginatedCollectionRequest();
     $paginationInfo->setPage($page);
     $paginationInfo->setItemsPerPage($itemsPerPage);
     return $paginationInfo;
 }
 /**
  * {@inheritDoc}
  */
 public function build()
 {
     $paginationInfo = new PaginatedCollectionRequest();
     $paginationInfo->setPage(1);
     return $paginationInfo;
 }