当前位置: 首页>>代码示例>>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;未经允许,请勿转载。