本文整理汇总了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));
}
}
示例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;
});
}
}
示例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')));
}
}
}
}
示例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);
}
}
示例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
}
}