本文整理汇总了PHP中BP_Groups_Group::get_membership_requests方法的典型用法代码示例。如果您正苦于以下问题:PHP BP_Groups_Group::get_membership_requests方法的具体用法?PHP BP_Groups_Group::get_membership_requests怎么用?PHP BP_Groups_Group::get_membership_requests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BP_Groups_Group
的用法示例。
在下文中一共展示了BP_Groups_Group::get_membership_requests方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($group_id, $per_page, $max)
{
global $bp;
$this->pag_page = isset($_REQUEST['mrpage']) ? intval($_REQUEST['mrpage']) : 1;
$this->pag_num = isset($_REQUEST['num']) ? intval($_REQUEST['num']) : $per_page;
$this->requests = BP_Groups_Group::get_membership_requests($group_id, $this->pag_num, $this->pag_page);
if (!$max || $max >= (int) $this->requests['total']) {
$this->total_request_count = (int) $this->requests['total'];
} else {
$this->total_request_count = (int) $max;
}
$this->requests = $this->requests['requests'];
if ($max) {
if ($max >= count($this->requests)) {
$this->request_count = count($this->requests);
} else {
$this->request_count = (int) $max;
}
} else {
$this->request_count = count($this->requests);
}
$this->pag_links = paginate_links(array('base' => add_query_arg('mrpage', '%#%'), 'format' => '', 'total' => ceil($this->total_request_count / $this->pag_num), 'current' => $this->pag_page, 'prev_text' => '←', 'next_text' => '→', 'mid_size' => 1));
}