Вход Регистрация
Файл: concrete5.7.5.6/concrete/controllers/single_page/members/directory.php
Строк: 42
<?php
namespace ConcreteControllerSinglePageMembers;

use 
ConcreteCorePageControllerPublicProfilePageController;
use 
UserAttributeKey;
use 
Loader;
use 
ConcreteCoreUserUserList;

class 
Directory extends PublicProfilePageController
{

    
/**
     * @var ConcreteCoreUserUserList
     */
    
protected $userList;

    public function 
on_start()
    {
        
parent::on_start();
        
$this->requireAsset('css''core/frontend/pagination');
        
$this->userList = new UserList();
        
$this->userList->sortByUserID();
    }

    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);
    }

    public function 
search_members()
    {
        
$keywords $this->get('keywords');
        if (
$keywords != '') {
            
$this->userList->filterByKeywords($keywords);
        }
    }

}
Онлайн: 2
Реклама