本文整理汇总了PHP中Admin\Builder\AdminListBuilder::addUrlParam方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminListBuilder::addUrlParam方法的具体用法?PHP AdminListBuilder::addUrlParam怎么用?PHP AdminListBuilder::addUrlParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin\Builder\AdminListBuilder
的用法示例。
在下文中一共展示了AdminListBuilder::addUrlParam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: weibo
public function weibo($page = 1, $r = 20, $content = '')
{
//读取微博列表
$map = array('status' => array('EGT', 0));
$model = M('Weibo');
if ($content != '') {
$map['content'] = array('like', '%' . $content . '%');
}
$list = $model->where($map)->order('create_time desc')->page($page, $r)->select();
unset($li);
$totalCount = $model->where($map)->count();
//显示页面
$builder = new AdminListBuilder();
$attr['class'] = 'btn ajax-post';
$attr['target-form'] = 'ids';
$attr1 = $attr;
$attr1['url'] = $builder->addUrlParam(U('setWeiboTop'), array('top' => 1));
$attr0 = $attr;
$attr0['url'] = $builder->addUrlParam(U('setWeiboTop'), array('top' => 0));
$builder->title('微博管理')->setStatusUrl(U('setWeiboStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->button('置顶', $attr1)->button('取消置顶', $attr0)->keyId()->keyLink('content', '内容', 'comment?weibo_id=###')->keyUid()->keyCreateTime()->keyStatus()->keyDoActionEdit('editWeibo?id=###')->keyMap('is_top', '置顶', array(0 => '不置顶', 1 => '置顶'))->search('内容', 'content')->data($list)->pagination($totalCount, $r)->display();
}
示例2: topic
public function topic()
{
$aPage = I('page', 1, 'intval');
$aName = I('name', '', 'op_t');
$r = 20;
$model = M('WeiboTopic');
$aName && ($map['name'] = array('like', '%' . $aName . '%'));
$list = $model->where($map)->order('id asc')->page($aPage, $r)->select();
unset($li);
$totalCount = $model->where($map)->count();
//显示页面
$builder = new AdminListBuilder();
$attr['class'] = 'btn ajax-post';
$attr['target-form'] = 'ids';
$attr1 = $attr;
$attr1['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 1));
$attr0 = $attr;
$attr0['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 0));
$attr_del = $attr;
$attr_del['url'] = $builder->addUrlParam(U('delTopic'), array());
$builder->title(L('_TOPIC_MANAGER_'))->button(L('_RECOMMEND_'), $attr1)->button(L('_RECOMMEND_CANCEL_'), $attr0)->button(L('_DELETE_'), $attr_del)->keyId()->keyLink('name', L('_CONTENT_'), 'weibo?content=%23{$name}%23')->keyUid()->keyText('logo', L('_LOGO_'))->keyText('intro', L('_LEADER_WORDS_'))->keyText('qrcode', L('_QR_CODE_'))->keyText('uadmin', L('_TOPIC_ADMIN_'))->keyText('read_count', L('_VIEWS_'))->keyMap('is_top', L('_RECOMMEND_YES_OR_NOT_'), array(0 => L('_RECOMMEND_NOT_'), 1 => L('_RECOMMEND_')))->search(L('_NAME_'), 'name')->data($list)->pagination($totalCount, $r)->display();
}
示例3: topic
public function topic()
{
$aPage = I('page', 1, 'intval');
$aName = I('name', '', 'op_t');
$r = 20;
$model = M('WeiboTopic');
$aName && ($map['name'] = array('like', '%' . $aName . '%'));
$list = $model->where($map)->order('id asc')->page($aPage, $r)->select();
unset($li);
$totalCount = $model->where($map)->count();
//显示页面
$builder = new AdminListBuilder();
$attr['class'] = 'btn ajax-post';
$attr['target-form'] = 'ids';
$attr1 = $attr;
$attr1['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 1));
$attr0 = $attr;
$attr0['url'] = $builder->addUrlParam(U('setTopicTop'), array('top' => 0));
$attr_del = $attr;
$attr_del['url'] = $builder->addUrlParam(U('delTopic'), array());
$builder->title('话题管理')->button('推荐', $attr1)->button('取消推荐', $attr0)->button('删除', $attr_del)->keyId()->keyLink('name', '内容', 'weibo?content=%23{$name}%23')->keyUid()->keyText('logo', 'Logo')->keyText('intro', '导语')->keyText('qrcode', '二维码')->keyText('uadmin', '话题管理员')->keyText('read_count', '阅读量')->keyMap('is_top', '是否推荐', array(0 => '不推荐', 1 => '推荐'))->search('名称', 'name')->data($list)->pagination($totalCount, $r)->display();
}