Пример #1
0
 public function on_before_render()
 {
     $pagination = $this->userList->getPagination();
     $users = $pagination->getCurrentPageResults();
     $this->set('userList', $this->userList);
     $this->set('users', $users);
     $this->set('total', $pagination->getTotalResults());
     $this->set('attribs', UserAttributeKey::getMemberListList());
     $this->set('keywords', Loader::helper('text')->entities($_REQUEST['keywords']));
     $this->set('pagination', $pagination);
 }
Пример #2
0
 public function testGroups()
 {
     $u = \User::getByUserID(2);
     $g = Group::add('Test Group', 'Test Group');
     $u->enterGroup($g);
     $this->list->filterByGroup($g);
     $this->assertEquals(1, $this->list->getTotalResults());
     $pagination = $this->list->getPagination();
     $this->assertEquals(1, $pagination->getTotalResults());
     $results = $pagination->getCurrentPageResults();
     $this->assertInstanceOf('\\Concrete\\Core\\User\\UserInfo', $results[0]);
     $this->assertEquals('testuser2', $results[0]->getUserName());
     $nl = new UserList();
     $nl->filterByGroup($g, false);
     $nl->sortByUserID();
     $this->assertEquals(2, $nl->getTotalResults());
     $results = $nl->getResults();
     $this->assertEquals('testuser', $results[0]->getUserName());
     $this->assertEquals('andrew', $results[1]->getUserName());
 }
Пример #3
0
 /**
  * @return \Concrete\Core\Search\Pagination\Pagination|\Concrete\Core\Search\Pagination\PermissionablePagination
  */
 public function getPagination()
 {
     return parent::getPagination();
 }