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


PHP AdminConfigBuilder::keyEditor方法代码示例

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


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

示例1: website

 public function website()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('网站信息')->suggest('此处配置网站的一般信息。');
     $builder->keyText('WEB_SITE_NAME', '网站名', '用于邮件,短信,站内信显示');
     $builder->keyText('ICP', '网站备案号', '设置在网站底部显示的备案号,如“沪ICP备12007941号-2');
     $builder->keySingleImage('LOGO', '网站Logo', '网站的logo设置,建议尺寸156*50');
     $builder->keySingleImage('QRCODE', '微信二维码', '悬浮微信二维码');
     $builder->keySingleImage('JUMP_BACKGROUND', '跳转页背景图片', '跳转页背景图片');
     $builder->keyText('SUCCESS_WAIT_TIME', '成功等待时间', '设置成功时页面等待页面');
     $builder->keyText('ERROR_WAIT_TIME', '失败等待时间', '设置失败时页面等待页面');
     $builder->keyEditor('ABOUT_US', '关于我们内容', '页脚关于我们介绍');
     $builder->keyEditor('SUBSCRIB_US', '关注我们', '页脚关注我们内容');
     $builder->keyEditor('COPY_RIGHT', '版权信息', '页脚版权信息');
     $builder->group('基本信息', array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE'));
     $builder->group('页脚信息', array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
     $builder->group('跳转页面', array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
     $builder->data($data);
     $builder->keyDefault('SUCCESS_WAIT_TIME', 2);
     $builder->keyDefault('ERROR_WAIT_TIME', 5);
     $builder->buttonSubmit();
     $builder->display();
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:24,代码来源:ConfigController.class.php

示例2: website

 public function website()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title(L('_SITE_INFO_'))->suggest(L('_SITE_INFO_VICE_'));
     /*        $builder->keySelect('LANG', L('_WEBSITE_LANGUAGE_'), L('_SELECT_THE_DEFAULT_LANGUAGE_'), array('zh-cn' => L('_SIMPLIFIED_CHINESE_'), 'en-us' => L('_ENGLISH_')));*/
     $builder->keyText('WEB_SITE_NAME', L('_SITE_NAME_'), L('_SITE_NAME_VICE_'));
     $builder->keyText('ICP', L('_LICENSE_NO_'), L('_LICENSE_NO_VICE_'));
     $builder->keySingleImage('LOGO', L('_SITE_LOGO_'), L('_SITE_LOGO_VICE_'));
     $builder->keySingleImage('QRCODE', L('_QR_WEIXIN_'), L('_QR_WEIXIN_VICE_'));
     $builder->keySingleImage('JUMP_BACKGROUND', L('_IMG_BG_REDIRECTED_'), L('_IMG_BG_REDIRECTED_'));
     $builder->keyText('SUCCESS_WAIT_TIME', L(''), L(''));
     $builder->keyText('ERROR_WAIT_TIME', L(''), L(''));
     $builder->keyEditor('ABOUT_US', L(''), L(''));
     $builder->keyEditor('SUBSCRIB_US', L(''), L(''));
     $builder->keyEditor('COPY_RIGHT', L(''), L(''));
     $addons = \Think\Hook::get('uploadDriver');
     $opt = array('local' => L('_LOCAL_'));
     foreach ($addons as $name) {
         if (class_exists($name)) {
             $class = new $name();
             $config = $class->getConfig();
             if ($config['switch']) {
                 $opt[$class->info['name']] = $class->info['title'];
             }
         }
     }
     $builder->keySelect('PICTURE_UPLOAD_DRIVER', L('_PICTURE_UPLOAD_DRIVER_'), L('_PICTURE_UPLOAD_DRIVER_'), $opt);
     $builder->keySelect('DOWNLOAD_UPLOAD_DRIVER', L('_ATTACHMENT_UPLOAD_DRIVER_'), L('_ATTACHMENT_UPLOAD_DRIVER_'), $opt);
     $builder->group(L('_BASIC_INFORMATION_'), array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE', 'LANG'));
     $builder->group(L('_THE_FOOTER_INFORMATION_'), array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
     $builder->group(L('_JUMP_PAGE_'), array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
     $builder->keyBool('GET_INFORMATION', L('_OPEN_INSTANT_ACCESS_TO_THE_MESSAGE_'), L('_OPEN_INSTANT_ACCESS_TO_THE_MESSAGE_VICE_'));
     $builder->keyText('GET_INFORMATION_INTERNAL', L('_MESSAGE_POLLING_INTERVAL_'), L('_MESSAGE_POLLING_INTERVAL_VICE_'));
     $builder->group(L('_PERFORMANCE_SETTINGS_'), array('GET_INFORMATION', 'GET_INFORMATION_INTERNAL'));
     $builder->group(L('_UPLOAD_CONFIGURATION_'), array('PICTURE_UPLOAD_DRIVER', 'DOWNLOAD_UPLOAD_DRIVER'));
     $builder->data($data);
     $builder->keyDefault('SUCCESS_WAIT_TIME', 2);
     $builder->keyDefault('ERROR_WAIT_TIME', 5);
     $builder->keyDefault('LANG', 'zh-cn');
     $builder->keyDefault('GET_INFORMATION', 1);
     $builder->keyDefault('GET_INFORMATION_INTERNAL', 10);
     $builder->buttonSubmit();
     $builder->display();
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:45,代码来源:ConfigController.class.php

示例3: website

 public function website()
 {
     $builder = new AdminConfigBuilder();
     $data = $builder->handleConfig();
     $builder->title('网站信息')->suggest('此处配置网站的一般信息。');
     $builder->keyText('WEB_SITE_NAME', '网站名', '用于邮件,短信,站内信显示');
     $builder->keyText('ICP', '网站备案号', '设置在网站底部显示的备案号,如“沪ICP备12007941号-2');
     $builder->keySingleImage('LOGO', '网站Logo', '网站的logo设置,建议尺寸156*50');
     $builder->keySingleImage('QRCODE', '微信二维码', '悬浮微信二维码');
     $builder->keySingleImage('JUMP_BACKGROUND', '跳转页背景图片', '跳转页背景图片');
     $builder->keyText('SUCCESS_WAIT_TIME', '成功等待时间', '设置成功时页面等待页面');
     $builder->keyText('ERROR_WAIT_TIME', '失败等待时间', '设置失败时页面等待页面');
     $builder->keyEditor('ABOUT_US', '关于我们内容', '页脚关于我们介绍');
     $builder->keyEditor('SUBSCRIB_US', '关注我们', '页脚关注我们内容');
     $builder->keyEditor('COPY_RIGHT', '版权信息', '页脚版权信息');
     $addons = \Think\Hook::get('uploadDriver');
     $opt = array('local' => '本地');
     foreach ($addons as $name) {
         if (class_exists($name)) {
             $class = new $name();
             $config = $class->getConfig();
             if ($config['switch']) {
                 $opt[$class->info['name']] = $class->info['title'];
             }
         }
     }
     $builder->keySelect('PICTURE_UPLOAD_DRIVER', '图片上传驱动', '图片上传驱动', $opt);
     $builder->keySelect('DOWNLOAD_UPLOAD_DRIVER', '附件上传驱动', '附件上传驱动', $opt);
     $builder->group('基本信息', array('WEB_SITE_NAME', 'ICP', 'LOGO', 'QRCODE'));
     $builder->group('页脚信息', array('ABOUT_US', 'SUBSCRIB_US', 'COPY_RIGHT'));
     $builder->group('跳转页面', array('JUMP_BACKGROUND', 'SUCCESS_WAIT_TIME', 'ERROR_WAIT_TIME'));
     $builder->group('上传配置', array('PICTURE_UPLOAD_DRIVER', 'DOWNLOAD_UPLOAD_DRIVER'));
     $builder->data($data);
     $builder->keyDefault('SUCCESS_WAIT_TIME', 2);
     $builder->keyDefault('ERROR_WAIT_TIME', 5);
     $builder->buttonSubmit();
     $builder->display();
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:38,代码来源:ConfigController.class.php

示例4: editSection

 public function editSection()
 {
     $aSectionId = I('id', 0, 'intval');
     $oldSection = $this->bookSectionModel->getData($aSectionId);
     $title = $oldSection['type'] ? '编辑文章: ' . $oldSection['title'] : '编辑章节: ' . $oldSection['title'];
     if (!$oldSection) {
         $this->error(L('_THIS_CHAPTER_DOES_NOT_EXIST_AND_CANNOT_BE_EDITED_WITH_EXCLAMATION_'));
     }
     if (IS_POST) {
         $data['id'] = $aSectionId;
         $data['uid'] = I('post.uid', get_uid(), 'intval');
         $data['title'] = I('post.title', '', 'text');
         $data['pid'] = I('post.pid', 0, 'intval');
         $data['keywords'] = I('post.keywords', '', 'text');
         $data['summary'] = I('post.summary', '', 'text');
         $data['is_show'] = I('post.is_show', 1, 'intval');
         $data['sort'] = I('post.sort', 0, 'intval');
         $data['create_time'] = I('post.create_time', time(), 'intval');
         $data['status'] = I('post.status', 1, 'intval');
         $data['book_id'] = $oldSection['book_id'];
         $data['color'] = I('post.color', '', 'text');
         if (!$oldSection['type']) {
             $data['open_child'] = I('post.open_child', 1, 'intval');
         }
         if (mb_strlen($data['title'], 'utf-8') <= 0) {
             $this->error(L('_TITLE_CAN_NOT_BE_EMPTY_WITH_EXCLAMATION_'));
         }
         $res_section = $this->bookSectionModel->editData($data);
         if ($oldSection['type']) {
             $detail['section_id'] = $aSectionId;
             $detailModel = D('BookDetail');
             $exist = $detailModel->where($detail)->find();
             $detail['content'] = $_POST['content'];
             if ($exist) {
                 $detail['id'] = $exist['id'];
                 $res_detail = $detailModel->save($detail);
             } else {
                 $res_detail = $detailModel->add($detail);
             }
         }
         if ($res_section || $res_detail) {
             $this->success(L('_OPERATION_SUCCESS_WITH_EXCLAMATION_'));
         } else {
             if ($oldSection['type']) {
                 $this->error('编辑失败!操作章节表时报 ' . $this->bookSectionModel->getError() . L('_WRONG;_THE_OPERATION_OF_THE_ARTICLE_FOR_DETAILS_OF_THE_TIMES_') . $detailModel->getError() . L('_WRONG_WITH_PERIOD_'));
             } else {
                 $this->error(L('_EDIT_FAILED_WITH_EXCLAMATION_') . $this->bookSectionModel->getError());
             }
         }
     } else {
         $options = $this->bookSectionModel->getSectionOptions($oldSection['book_id'], $aSectionId);
         $builder = new AdminConfigBuilder();
         $builder->title($title);
         $builder->data($oldSection)->keyId()->keyUid('uid', L('_AUTHOR_UID_'))->keyTitle('title', L('_TITLE_'))->keySelect('pid', L('_FATHER_CLASS_'), '', $options)->keyText('keywords', L('_KEY_WORDS_'))->keyTextArea('summary', L('_INTRODUCTION_'));
         if ($oldSection['type']) {
             $builder->keyEditor('content', L('_CONTENT_'), '', 'all', array('width' => '850px', 'height' => '400px'));
         } else {
             $builder->keyBool('open_child', L('_START_SUB_CHAPTER_'));
         }
         $builder->keyRadio('is_show', L('_RELEASE_STATUS_'), '', array('0' => L('_DRAFT_'), '1' => L('_NORMAL_')))->keyInteger('sort', L('_SORT_'))->keyColor('color', L('_TEXT_COLOR_'))->keyCreateTime()->keyStatus()->buttonSubmit()->buttonBack()->display();
     }
 }
开发者ID:sunjie20081001,项目名称:sns,代码行数:62,代码来源:BookController.class.php


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