當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。