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


PHP AdminListBuilder::keyTime方法代码示例

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


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

示例1: audit

 public function audit($page = 1, $r = 20)
 {
     $aAudit = I('audit', 0, 'intval');
     if ($aAudit == 3) {
         $map['status'] = array('in', array(-1, 2));
     } elseif ($aAudit == 2) {
         $map['dead_line'] = array('elt', time());
         $map['status'] = 2;
     } elseif ($aAudit == 1) {
         $map['status'] = -1;
     } else {
         $map['status'] = 2;
         $map['dead_line'] = array('gt', time());
     }
     list($list, $totalCount) = $this->newsModel->getListByPage($map, $page, 'update_time desc', '*', $r);
     $cates = array_column($list, 'category');
     $category = $this->newsCategoryModel->getCategoryList(array('id' => array('in', $cates), 'status' => 1), 1);
     $category = array_combine(array_column($category, 'id'), $category);
     foreach ($list as &$val) {
         $val['category'] = '[' . $val['category'] . '] ' . $category[$val['category']]['title'];
     }
     unset($val);
     $builder = new AdminListBuilder();
     $builder->title('资讯列表(审核通过的不在该列表中)')->data($list)->setStatusUrl(U('News/setNewsStatus'))->buttonEnable(null, '审核通过')->buttonModalPopup(U('News/doAudit'), null, '审核不通过', array('data-title' => '设置审核失败原因', 'target-form' => 'ids'))->setSelectPostUrl(U('Admin/News/audit'))->select('', 'audit', 'select', '', '', '', array(array('id' => 0, 'value' => '待审核'), array('id' => 1, 'value' => '审核失败'), array('id' => 2, 'value' => '已过期未审核'), array('id' => 3, 'value' => '全部审核')))->keyId()->keyUid()->keyText('title', '标题')->keyText('category', '分类')->keyText('description', '摘要')->keyText('sort', '排序');
     if ($aAudit == 1) {
         $builder->keyText('reason', '审核失败原因');
     }
     $builder->keyTime('dead_line', '有效期至')->keyCreateTime()->keyUpdateTime()->keyDoActionEdit('News/editNews?id=###')->pagination($totalCount, $r)->display();
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:29,代码来源:NewsController.class.php

示例2: field

 public function field($id, $page = 1, $r = 20)
 {
     $profile = D('field_group')->where('id=' . $id)->find();
     $map['status'] = array('egt', 0);
     $map['profile_group_id'] = $id;
     $field_list = D('field_setting')->where($map)->order("sort asc")->page($page, $r)->select();
     $totalCount = D('field_setting')->where($map)->count();
     $type_default = array('input' => L('_ONE-WAY_TEXT_BOX_'), 'radio' => L('_RADIO_BUTTON_'), 'checkbox' => L('_CHECKBOX_'), 'select' => L('_DROP-DOWN_BOX_'), 'time' => L('_DATE_'), 'textarea' => L('_MULTI_LINE_TEXT_BOX_'));
     $child_type = array('string' => L('_STRING_'), 'phone' => L('_PHONE_NUMBER_'), 'email' => L('_MAILBOX_'), 'number' => L('_NUMBER_'), 'join' => L('_RELATED_FIELD_'));
     foreach ($field_list as &$val) {
         $val['form_type'] = $type_default[$val['form_type']];
         $val['child_form_type'] = $child_type[$val['child_form_type']];
     }
     $builder = new AdminListBuilder();
     $builder->title('【' . $profile['profile_name'] . '】 字段管理');
     $builder->meta_title = $profile['profile_name'] . L('_FIELD_MANAGEMENT_');
     $builder->buttonNew(U('editFieldSetting', array('id' => '0', 'profile_group_id' => $id)))->buttonDelete(U('setFieldSettingStatus', array('status' => '-1')))->setStatusUrl(U('setFieldSettingStatus'))->buttonSort(U('sortField', array('id' => $id)))->button(L('_RETURN_'), array('href' => U('profile')));
     $builder->keyId()->keyText('field_name', L('_FIELD_NAME_'))->keyBool('visiable', L('_OPEN_YE_OR_NO_'))->keyBool('required', L('_WHETHER_THE_REQUIRED_'))->keyText('sort', L('_SORT_'))->keyText('form_type', L('_FORM_TYPE_'))->keyText('child_form_type', L('_TWO_FORM_TYPE_'))->keyText('form_default_value', L('_DEFAULT_'))->keyText('validation', L('_FORM_VERIFICATION_MODE_'))->keyText('input_tips', L('_USER_INPUT_PROMPT_'));
     $builder->keyTime("createTime", L('_CREATE_TIME_'))->keyStatus()->keyDoAction('User/editFieldSetting?profile_group_id=' . $id . '&id=###', L('_EDIT_'));
     $builder->data($field_list);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:naliduo,项目名称:Lightweight-social-platform,代码行数:23,代码来源:UserController.class.php

示例3: field

 public function field($id, $page = 1, $r = 20)
 {
     $profile = D('field_group')->where('id=' . $id)->find();
     $map['status'] = array('egt', 0);
     $map['profile_group_id'] = $id;
     $field_list = D('field_setting')->where($map)->order("sort asc")->page($page, $r)->select();
     $totalCount = D('field_setting')->where($map)->count();
     $type_default = array('input' => '单行文本框', 'radio' => '单选按钮', 'checkbox' => '多选框', 'select' => '下拉选择框', 'time' => '日期', 'textarea' => '多行文本框');
     $child_type = array('string' => '字符串', 'phone' => '手机号码', 'email' => '邮箱', 'number' => '数字', 'join' => '关联字段');
     foreach ($field_list as &$val) {
         $val['form_type'] = $type_default[$val['form_type']];
         $val['child_form_type'] = $child_type[$val['child_form_type']];
     }
     $builder = new AdminListBuilder();
     $builder->title('【' . $profile['profile_name'] . '】 字段管理');
     $builder->meta_title = $profile['profile_name'] . '字段管理';
     $builder->buttonNew(U('editFieldSetting', array('id' => '0', 'profile_group_id' => $id)))->buttonDelete(U('setFieldSettingStatus', array('status' => '-1')))->setStatusUrl(U('setFieldSettingStatus'))->buttonSort(U('sortField', array('id' => $id)))->button('返回', array('href' => U('profile')));
     $builder->keyId()->keyText('field_name', "字段名称")->keyBool('visiable', '是否公开')->keyBool('required', '是否必填')->keyText('sort', "排序")->keyText('form_type', '表单类型')->keyText('child_form_type', '二级表单类型')->keyText('form_default_value', '默认值')->keyText('validation', '表单验证方式')->keyText('input_tips', '用户输入提示');
     $builder->keyTime("createTime", "创建时间")->keyStatus()->keyDoAction('User/editFieldSetting?profile_group_id=' . $id . '&id=###', '编辑');
     $builder->data($field_list);
     $builder->pagination($totalCount, $r);
     $builder->display();
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:23,代码来源:UserController.class.php


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