加入收藏 | 设为首页 | 会员中心 | 我要投稿 网站开发网_安阳站长网 (https://www.0518zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长百科 > 正文

php 重写分页器 CLinkPager的实例

发布时间:2021-03-18 10:41:04 所属栏目:站长百科 来源:网络整理
导读:副标题#e# php 重写分页器 CLinkPager的实例 1、自定义的分页器类放在哪里? 有两个位置可以放, 第一种是放在 protected/extensions 中,在使用是import进来,或在config文件中import进来; 第二种是放在 protected/components 中,作为组件存在,不需要im

/**

  • Creates a page button.
  • You may override this method to customize the page buttons.
  • @param string $label the text label for the button
  • @param integer $page the page number
  • @param string $class the CSS class for the page button.
  • @param boolean $hidden whether this page button is visible
  • @param boolean $selected whether this page button is selected
  • @return string the generated button
    */
    protected function createPageButton($label,$class,$hidden,$selected)
    {
    if($hidden || $selected)
    $class.=' '.($hidden ? $this->hiddenPageCssClass : $this->selectedPageCssClass);
    if ($selected) {
    $result = "" . ++$page . "";
    } else {
    $result = CHtml::link($label,$this->createPageUrl($page));
    }
    return $result;
    }

/**

  • (编辑:网站开发网_安阳站长网)

    【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!