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


PHP AdminListBuilder::keyDoActionEdit方法代码示例

本文整理汇总了PHP中Admin\Builder\AdminListBuilder::keyDoActionEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminListBuilder::keyDoActionEdit方法的具体用法?PHP AdminListBuilder::keyDoActionEdit怎么用?PHP AdminListBuilder::keyDoActionEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Admin\Builder\AdminListBuilder的用法示例。


在下文中一共展示了AdminListBuilder::keyDoActionEdit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildList

 /**
  * 公告列表
  * @param int $page
  * @param int $r
  * @author 郑钟良<zzl@ourstu.com>
  */
 public function buildList($page = 1, $r = 20)
 {
     $map['status'] = 1;
     $aDown = I('down', 0, 'intval');
     $this->assign('down', $aDown);
     if ($aDown) {
         $map['end_time'] = array('elt', time());
     } else {
         $map['end_time'] = array('gt', time());
     }
     list($list, $totalCount) = $this->announcementModel->getListPage($map, $page, 'id desc', $r);
     $builder = new AdminListBuilder();
     $builder->title('公告列表');
     $builder->buttonNew(addons_url('Announcement://admin/edit'));
     $builder->setSelectPostUrl(addons_url('Announcement://admin/buildList'))->select('', 'down', 'select', '', '', '', array(array('id' => 0, 'value' => '当前公告'), array('id' => 1, 'value' => '历史公告')));
     $builder->keyId()->keyTitle()->keyIcon()->keyText('link', '链接')->keyText('content', '内容')->keyCreateTime()->keyTime('end_time', '截止日期');
     $builder->keyDoActionEdit('Announcement://admin/edit?id=###|addons_url');
     if (!$aDown) {
         $builder->ajaxButton(addons_url('Announcement://admin/setEnd'), '', '设为到期')->keyDoAction('Announcement://admin/setEnd?ids=###|addons_url', '设为到期');
     }
     $builder->data($list)->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:29,代码来源:AdminController.class.php

示例2: fieldTrash

 public function fieldTrash($page = 1, $r = 20)
 {
     $aModel = I('model', 'CatField', 'text');
     $listBuilder = new AdminListBuilder();
     $listBuilder->clearTrash($aModel);
     $listBuilder->title('字段管理');
     $data = M('cat_field')->where(' status=-1')->order('sort desc')->page($page, $r)->select();
     $totalCount = M('cat_field')->where(' status=-1')->count();
     $type_alias = array(IT_SINGLE_TEXT => '单行文本', IT_MULTI_TEXT => '多行文本', IT_SELECT => '下拉框', IT_CHECKBOX => '多选框', IT_RADIO => '单选框', IT_EDITOR => '编辑器', IT_PIC => '单图上传');
     foreach ($data as $key => $v) {
         $data[$key]['input_type'] = $type_alias[$v['input_type']];
         $entity = M('cat_entity')->find($v['entity_id']);
         $data[$key]['entity_alias'] = $entity['alias'];
     }
     $listBuilder->keyId();
     $listBuilder->keyText('name', '英文名')->keyLink('entity_alias', '模型', 'field?entity_id={$entity_id}')->keyText('alias', '中文名')->keyText('sort', '排序')->keyText('input_type', '输入类型');
     $listBuilder->keyDoActionEdit('editField?id=####');
     $listBuilder->buttonRestore(U('setFieldStatus', array('status' => 1)))->buttonClear('CatField');
     //$listBuilder->buttonSort(U('sortField'));
     $listBuilder->pagination($totalCount, $r);
     $listBuilder->data($data);
     $listBuilder->display();
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:23,代码来源:CatController.class.php


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