本文整理匯總了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();
}