本文整理匯總了PHP中Admin\Builder\AdminListBuilder::setSearchPostUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP AdminListBuilder::setSearchPostUrl方法的具體用法?PHP AdminListBuilder::setSearchPostUrl怎麽用?PHP AdminListBuilder::setSearchPostUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Admin\Builder\AdminListBuilder
的用法示例。
在下文中一共展示了AdminListBuilder::setSearchPostUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: expandinfo_select
public function expandinfo_select($page = 1, $r = 20)
{
$nickname = I('nickname');
$map['status'] = array('egt', 0);
if (is_numeric($nickname)) {
$map['uid|nickname'] = array(intval($nickname), array('like', '%' . $nickname . '%'), '_multi' => true);
} else {
$map['nickname'] = array('like', '%' . (string) $nickname . '%');
}
$list = M('Member')->where($map)->order('last_login_time desc')->page($page, $r)->select();
$totalCount = M('Member')->where($map)->count();
int_to_string($list);
//擴展信息查詢
$map_profile['status'] = 1;
$field_group = D('field_group')->where($map_profile)->select();
$field_group_ids = array_column($field_group, 'id');
$map_profile['profile_group_id'] = array('in', $field_group_ids);
$fields_list = D('field_setting')->where($map_profile)->getField('id,field_name,form_type');
$fields_list = array_combine(array_column($fields_list, 'field_name'), $fields_list);
$fields_list = array_slice($fields_list, 0, 8);
//取出前8條,用戶擴展資料默認顯示8條
foreach ($list as &$tkl) {
$tkl['id'] = $tkl['uid'];
$map_field['uid'] = $tkl['uid'];
foreach ($fields_list as $key => $val) {
$map_field['field_id'] = $val['id'];
$field_data = D('field')->where($map_field)->getField('field_data');
if ($field_data == null || $field_data == '') {
$tkl[$key] = '';
} else {
$tkl[$key] = $field_data;
}
}
}
$builder = new AdminListBuilder();
$builder->title(L('_USER_EXPAND_INFO_LIST_'));
$builder->meta_title = L('_USER_EXPAND_INFO_LIST_');
$builder->setSearchPostUrl(U('Admin/User/expandinfo_select'))->search(L('_SEARCH_'), 'nickname', 'text', L('_PLACEHOLDER_NICKNAME_ID_'));
$builder->keyId()->keyLink('nickname', L('_NICKNAME_'), 'User/expandinfo_details?uid=###');
foreach ($fields_list as $vt) {
$builder->keyText($vt['field_name'], $vt['field_name']);
}
$builder->data($list);
$builder->pagination($totalCount, $r);
$builder->display();
}