本文整理汇总了PHP中UserStatus::getStatusList方法的典型用法代码示例。如果您正苦于以下问题:PHP UserStatus::getStatusList方法的具体用法?PHP UserStatus::getStatusList怎么用?PHP UserStatus::getStatusList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserStatus
的用法示例。
在下文中一共展示了UserStatus::getStatusList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
// get the current page
$this->_page = $this->getCurrentPageFromRequest();
$this->_status = $this->getStatusFromRequest();
$this->_dest = $this->_getDestination();
// get the users of the blog
$users = new Users();
$siteUsers = $users->getAllUsers($this->_status, true, $this->_page, DEFAULT_ITEMS_PER_PAGE);
$numUsers = $users->getNumUsers($this->_status);
// in case of problems, empty array...
if (!$siteUsers) {
$siteUsers = array();
}
// notify the event
$this->notifyEvent(EVENT_USERS_LOADED, array("users" => &$blogUsers));
// calculate the links to the different pages
$pager = new Pager("?op=mailcentreUserSelector&&dest=" . $this->_dest . "&status=" . $this->_status . "&page=", $this->_page, $numUsers, DEFAULT_ITEMS_PER_PAGE);
// and generate the view
$this->setValue("siteusers", $siteUsers);
$this->setValue("userstatus", UserStatus::getStatusList(true));
$this->setValue("pager", $pager);
$this->setValue("currentstatus", $this->_status);
$this->setValue("dest", $this->_dest);
parent::render();
}
示例2: render
function render()
{
// load the list of blogs
$blogs = new Blogs();
$siteBlogs = $blogs->getAllBlogs();
$this->setValue('siteblogs', $siteBlogs);
$this->setValue('userStatusList', UserStatus::getStatusList());
parent::render();
}
示例3: render
function render()
{
// fetch the blogs to which this user belongs
$users = new Users();
$userBlogs = $users->getUsersBlogs($this->_user->getId());
$this->notifyEvent(EVENT_BLOGS_LOADED, array('blogs' => &$userBlogs));
// otherwise, transfer it to the template context and let the
// template do the rest
$this->setValue('edituser', $this->_user);
$this->setValue('edituserblogs', $userBlogs);
// list of available status
$this->setValue('userStatusList', UserStatus::getStatusList());
parent::render();
}
示例4: isValidStatus
/**
* @param status The status code we'd like to check
*
* @return Returns true if the status is valid or false otherwise
*/
function isValidStatus($status)
{
$statusList = UserStatus::getStatusList(true);
return in_array($status, $statusList);
}