本文整理汇总了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();
}
示例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();
}