當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Modules::is_active方法代碼示例

本文整理匯總了PHP中Modules::is_active方法的典型用法代碼示例。如果您正苦於以下問題:PHP Modules::is_active方法的具體用法?PHP Modules::is_active怎麽用?PHP Modules::is_active使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Modules的用法示例。


在下文中一共展示了Modules::is_active方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 /**
  * Is being loader after active modules has been loaded
  **/
 function init()
 {
     global $Options, $User_Options;
     $Options = $this->options = $this->get(NULL, NULL, TRUE);
     // Only when aauth is enabled
     if (Modules::is_active('aauth')) {
         $User_Options = $this->user_options = $this->get(NULL, $this->events->apply_filters('user_id', 0));
     }
 }
開發者ID:eboominathan,項目名稱:tendoo-cms,代碼行數:12,代碼來源:Options.php

示例2: loader

 function loader()
 {
     if (!Modules::is_active('post_type')) {
         $this->events->add_filter('ui_notices', function ($notices) {
             $notices[] = array('msg' => __('Post Type module is not enabled...'), 'icon' => 'times', 'type' => 'warning');
             return $notices;
         });
     }
 }
開發者ID:eboominathan,項目名稱:tendoo-cms,代碼行數:9,代碼來源:blog.php

示例3: after_session_starts

 /**
  * After options init
  *
  * @return void
  **/
 function after_session_starts()
 {
     if (Modules::is_active('dashboard')) {
         // load user model
         $this->load->model('users_model', 'users');
         // If there is no master user , redirect to master user creation if current controller isn't tendoo-setup
         if (!$this->users->master_exists() && $this->uri->segment(1) !== 'tendoo-setup') {
             redirect(array('tendoo-setup', 'site'));
         }
         // force user to be connected for certain controller
         if (in_array($this->uri->segment(1), $this->config->item('controllers_requiring_login')) && $this->setup->is_installed()) {
             if (!$this->users->is_connected()) {
                 redirect(array($this->config->item('default_login_route')));
             }
         }
     }
 }
開發者ID:2329697501,項目名稱:tendoo-cms,代碼行數:22,代碼來源:aauth.php

示例4: loader

 function loader()
 {
     if (!Modules::is_active('aauth')) {
         $this->events->add_filter('ui_notices', function ($notices) {
             $notices[] = array('msg' => __('Aauth Module is required, please install or enable it'), 'type' => 'warning', 'icon' => 'users', 'href' => site_url(array('dashboard', 'modules')));
             return $notices;
         });
     }
     if (Modules::is_active('aauth')) {
         $this->load->language('blog_lang');
         // including CustomQuery.php library file
         include_once LIBPATH . '/CustomQuery.php';
         include_once dirname(__FILE__) . '/inc/setup.php';
         $this->events->add_action('load_dashboard', array($this, '__register_page'));
         // Load Post Types
         $this->events->do_action('load_post_types', 15);
     }
 }
開發者ID:eboominathan,項目名稱:tendoo-cms,代碼行數:18,代碼來源:post_type.php

示例5: isset

        ?>
</h3>
         </div>
         <div class="box-body" style="height:100px;"><?php 
        echo isset($_module['application']['details']['description']) ? $_module['application']['details']['description'] : '';
        ?>
 </div>
         <div class="box-footer">
           	<?php 
        echo 'v' . (isset($_module['application']['details']['version']) ? $_module['application']['details']['version'] : 0.1);
        ?>
             <div class="box-tools pull-right">
            <?php 
        if (isset($_module['application']['details']['main'])) {
            // if the module has a main file, it can be activated
            if (!Modules::is_active($module_namespace)) {
                ?>
					  <a href="<?php 
                echo site_url(array('dashboard', 'modules', 'enable', $module_namespace));
                ?>
" class="btn btn-sm btn-default btn-box-tool" data-action="enable"><i style="font-size:20px;" class="fa fa-toggle-on"></i> Enable</a>
					<?php 
            } else {
                ?>
					  <a href="<?php 
                echo site_url(array('dashboard', 'modules', 'disable', $module_namespace));
                ?>
" class="btn btn-sm btn-default btn-box-tool" data-action="disable"><i style="font-size:20px;" class="fa fa-toggle-off"></i> Disable</a>
					<?php 
            }
        }
開發者ID:2329697501,項目名稱:tendoo-cms,代碼行數:31,代碼來源:list-dom.php


注:本文中的Modules::is_active方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。