Ejemplo n.º 1
0
 /**
  * Get a paginated table with users for a selected site
  * @param int $siteId
  * @param string $orderBy
  * @param int $order
  * @param int $page
  * @param int $perPage
  * @return \Application\Component\PaginatedTable\TableInterface;
  */
 protected function getUsersTable($siteId, $orderBy, $order, $page, $perPage)
 {
     $users = $this->services->getUserService()->findUsersOfSite($siteId, array($orderBy => $order), true);
     $users->setItemCountPerPage($perPage);
     $users->setCurrentPageNumber($page);
     $table = \Application\Factory\Component\PaginatedTableFactory::createUsersTable($users);
     $table->getColumns()->setOrder($orderBy, $order === Order::ASCENDING);
     return $table;
 }