当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminListBuilder::setSearchPostUrl方法代码示例

本文整理汇总了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();
 }
开发者ID:naliduo,项目名称:Lightweight-social-platform,代码行数:46,代码来源:UserController.class.php


注:本文中的Admin\Builder\AdminListBuilder::setSearchPostUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。