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


PHP Template::set_theme方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->library('template');
     $this->load->library('assets');
     $this->load->config('docs');
     $this->lang->load('docs');
     $this->docsGroup = $this->uri->segment(2);
     // Is displaying docs permitted for this environment?
     if (config_item('docs.permitted_environments') && !in_array(ENVIRONMENT, config_item('docs.permitted_environments'))) {
         Template::set_message(lang('docs_env_disabled'), 'error');
         redirect();
     }
     // Was a doc group provided?
     if (!$this->docsGroup) {
         redirect('docs/' . config_item('docs.default_group'));
     }
     $this->showAppDocs = config_item('docs.show_app_docs');
     $this->showDevDocs = config_item('docs.show_dev_docs');
     $this->tocFile = config_item('docs.toc_file') ?: '_toc.ini';
     // Make sure we can still get to the search method.
     if ($this->docsGroup == 'search') {
         $this->docsGroup = false;
     } elseif ($this->docsGroup == 'developer' && !$this->showDevDocs && ENVIRONMENT != 'development') {
         if ($this->showAppDocs) {
             Template::set_message(lang('docs_not_allowed_dev'), 'warning');
             redirect('docs/application');
         }
         show_error(lang('docs_not_allowed'));
     }
     Template::set_theme(config_item('docs.theme'), 'docs');
     $this->load->helper('form');
 }
开发者ID:brkrishna,项目名称:freelance,代码行数:38,代码来源:docs.php

示例2: __construct

 /**
  * Class constructor - setup paging and keyboard shortcuts as well as
  * load various libraries
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->library('template');
     $this->load->library('assets');
     $this->load->library('ui/contexts');
     // Pagination config
     $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '&rarr;', 'prev_link' => '&larr;', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>');
     $this->limit = $this->settings_lib->item('site.list_limit');
     // load the keyboard shortcut keys
     $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui'));
     Template::set('shortcut_data', $shortcut_data);
     // Profiler Bar?
     if (ENVIRONMENT == 'development') {
         if ($this->settings_lib->item('site.show_profiler') and has_permission('Bonfire.Profiler.View')) {
             // Profiler bar?
             if (!$this->input->is_cli_request() and !$this->input->is_ajax_request()) {
                 $this->load->library('Console');
                 $this->output->enable_profiler(TRUE);
             }
         }
     }
     // Basic setup
     Template::set_theme($this->config->item('template.admin_theme'), 'junk');
 }
开发者ID:correaecastro,项目名称:Bonfire,代码行数:30,代码来源:Admin_Controller.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->library('template');
     $this->load->library('assets');
     $this->load->config('docs');
     $this->lang->load('docs');
     Template::set_theme(config_item('docs.theme'), 'docs');
 }
开发者ID:brkrishna,项目名称:freelance,代码行数:9,代码来源:docs.php

示例4: index

 /**
  * Displays the homepage of the Bonfire app
  *
  * @return void
  */
 public function index()
 {
     //$this->load->library('users/auth');
     //$this->set_current_user();
     $embedData = $this->embedcontent_model->getAllEmbeds();
     Template::set_theme('my_theme', 'embeds');
     Template::set("embeds", $embedData);
     Template::set_view('/home/embeds');
     Template::render();
 }
开发者ID:heylittlehouse,项目名称:Saga,代码行数:15,代码来源:home.php

示例5: __construct

 /**
  * Class constructor setup login restriction and load various libraries
  *
  * @return void
  */
 public function __construct()
 {
     $this->autoload['helpers'][] = 'form';
     $this->autoload['libraries'][] = 'Template';
     parent::__construct();
     $this->load->library('form_validation');
     //$this->form_validation->CI =& $this;
     $this->form_validation->set_error_delimiters('', '');
     Template::set_theme('backend');
 }
开发者ID:ci-blox,项目名称:Ignition-Go,代码行数:15,代码来源:Admin_Controller.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     if (!class_exists('Assets')) {
         require APP_DIR . 'libraries/Assets.php';
     }
     if (!class_exists('Assets')) {
         require APP_DIR . 'libraries/Template.php';
     }
     Template::set_theme('admin');
 }
开发者ID:triasfahrudin,项目名称:siska21,代码行数:11,代码来源:test_asset_lib.php

示例7: __construct

 /**
  * Setup the required libraries etc.
  *
  * @retun void
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('form');
     $this->load->library('form_validation');
     $this->load->model('users/user_model');
     $this->load->library('users/auth');
     $this->lang->load('users');
     $this->siteSettings = $this->settings_lib->find_all();
     Template::set_theme('admin');
 }
开发者ID:vamsi683,项目名称:accept,代码行数:16,代码来源:Manage.php

示例8: test_lex_parser_in_themes

 public function test_lex_parser_in_themes()
 {
     Template::parse_views(true);
     Template::set_theme('default');
     $file = FCPATH . 'themes/default/bf_parser_test.php';
     // Create a simple file
     file_put_contents($file, '<span>{{ title }}</span>');
     Template::set('title', 'Lex Is Working');
     Template::load_view('bf_parser_test', null, '', true, $output);
     $this->assertTrue(class_exists('MY_Parser'));
     $this->assertEqual($output, '<span>Lex Is Working</span>');
     // Remove the temp file
     unlink($file);
 }
开发者ID:brkrishna,项目名称:freelance,代码行数:14,代码来源:template_test.php

示例9: __construct

 /**
  * Setup the required libraries etc.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('form');
     $this->load->library('form_validation');
     //        $this->load->model('users/user_model');
     $this->load->library('securinator/Auth');
     Template::set_theme('backend');
     //$this->lang->load('users');
     $this->siteSettings = $this->settings->find_all();
     //      if ($this->siteSettings['auth.password_show_labels'] == 1) {
     //js('users', 'password_strength.js');
     //js('users', 'jquery.strength.js');
     //      }
 }
开发者ID:ci-blox,项目名称:Ignition-Go,代码行数:20,代码来源:Dashboard.php

示例10: __construct

 /**
  * Class constructor - setup paging and keyboard shortcuts as well as
  * load various libraries
  *
  */
 public function __construct()
 {
     $this->autoload['libraries'][] = 'ui/contexts';
     parent::__construct();
     // Pagination config
     $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '&rarr;', 'prev_link' => '&larr;', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>');
     $this->limit = $this->settings_lib->item('site.list_limit');
     // load the keyboard shortcut keys
     $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui'));
     Template::set('shortcut_data', $shortcut_data);
     // Profiler Bar?
     if (ENVIRONMENT == 'development') {
         if ($this->settings_lib->item('site.show_profiler') && $this->auth->has_permission('Bonfire.Profiler.View')) {
             // Profiler bar?
             $this->showProfiler(false);
         }
     }
     // Basic setup
     Template::set_theme($this->config->item('template.admin_theme'), $this->config->item('template.default_theme'));
 }
开发者ID:ivantcholakov,项目名称:Bonfire,代码行数:25,代码来源:Admin_Controller.php

示例11: __construct

 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     $this->autoload['libraries'][] = 'ui/contexts';
     parent::__construct();
     // Pagination config
     $this->pager = array('full_tag_open' => '<div class="pagination pagination-right"><ul>', 'full_tag_close' => '</ul></div>', 'next_link' => '&rarr;', 'prev_link' => '&larr;', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="active"><a href="#">', 'cur_tag_close' => '</a></li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>');
     $this->limit = $this->settings_lib->item('site.list_limit');
     /*        // load the keyboard shortcut keys
             $shortcut_data = array(
                 'shortcuts' => config_item('ui.current_shortcuts'),
                 'shortcut_keys' => $this->settings_lib->find_all_by('module', 'core.ui'),
             );
             Template::set('shortcut_data', $shortcut_data);*/
     Events::trigger('before_front_controller');
     $this->load->library('template');
     $this->load->library('assets');
     $this->set_current_user();
     Events::trigger('after_front_controller');
     // Basic setup
     Template::set_theme($this->config->item('template.default_theme'));
 }
开发者ID:bhushan0206,项目名称:KnowledgeDesk,代码行数:25,代码来源:Front_Controller.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->lang->load('application');
     $this->load->helper('application');
     $this->load->library('pagination');
     // Pagination config
     $this->pager = array();
     $this->pager['full_tag_open'] = '<div class="pagination">';
     $this->pager['full_tag_close'] = '</div>';
     $this->pager['next_link'] = 'Next &raquo;';
     $this->pager['prev_link'] = '&laquo; Previous';
     $this->limit = $this->settings_lib->item('site.list_limit');
     // load the keyboard shortcut keys
     $shortcut_data = array('shortcuts' => config_item('ui.current_shortcuts'), 'shortcut_keys' => unserialize($this->settings_lib->item('ui.shortcut_keys')));
     Template::set('shortcut_data', $shortcut_data);
     // Profiler Bar?
     if (ENVIRONMENT == 'development') {
         $this->load->library('Console');
         if (!$this->input->is_cli_request() && $this->settings_lib->item('site.show_profiler')) {
             $this->output->enable_profiler(true);
         }
     }
     // Basic setup
     Template::set_theme('admin');
     Assets::add_css(array('ui.css', 'notifications.css', 'buttons.css'));
 }
开发者ID:nazrulworld,项目名称:Bonfire,代码行数:27,代码来源:MY_Controller.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->lang->load('application');
     $this->load->helper('application');
     $this->load->library('pagination');
     // Pagination config
     $this->pager = array();
     $this->pager['full_tag_open'] = '<div class="pagination">';
     $this->pager['full_tag_close'] = '</div>';
     $this->pager['next_link'] = 'Next &raquo;';
     $this->pager['prev_link'] = '&laquo; Previous';
     $this->limit = $this->config->item('site.list_limit');
     // Basic setup
     Template::set_theme('admin');
     Assets::add_css(array('ui.css', 'notifications.css', 'buttons.css'));
 }
开发者ID:hnmurugan,项目名称:Bonfire,代码行数:17,代码来源:MY_Controller.php


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