• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_module_enabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_module_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP is_module_enabled函数的具体用法?PHP is_module_enabled怎么用?PHP is_module_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: create

 public static function create(array $data = [])
 {
     if (is_module_enabled('Site')) {
         $siteId = Site::id();
         $data['site_id'] = $siteId;
     }
     return parent::create($data);
 }
开发者ID:bitsoflove,项目名称:Page,代码行数:8,代码来源:Page.php


示例2: newQuery

 public function newQuery()
 {
     $query = parent::newQuery();
     if (is_module_enabled('Site')) {
         $this->appendWhereClause($query);
     }
     return $query;
 }
开发者ID:bitsoflove,项目名称:Media,代码行数:8,代码来源:MultiSiteTenancyTrait.php


示例3: create

 public function create($data)
 {
     if (is_module_enabled('Site')) {
         $siteId = Site::id();
         $data['site_id'] = $siteId;
     }
     $menu = $this->model->create($data);
     event(new MenuWasCreated($menu));
     return $menu;
 }
开发者ID:bitsoflove,项目名称:Menu,代码行数:10,代码来源:EloquentMenuRepository.php


示例4: edit

 public function edit(Menu $menu)
 {
     $menuItems = $this->menuItem->allRootsForMenu($menu->id);
     $menuStructure = $this->menuRenderer->renderForMenu($menu->id, $menuItems->nest());
     $data = compact('menu', 'menuStructure');
     if (is_module_enabled('Site')) {
         $data['supportedLocales'] = \Site::current()->siteLocales->lists('title', 'locale')->toArray();
     }
     return view('menu::admin.menus.edit', $data);
 }
开发者ID:bitsoflove,项目名称:Menu,代码行数:10,代码来源:MenuController.php


示例5: handle

 public function handle($request, Closure $next)
 {
     //check if multi site tenancy is on, and if not, execute the original logic
     if (!is_module_enabled('Site')) {
         $original = \App::make('Mcamara\\LaravelLocalization\\Middleware\\LaravelLocalizationRedirectFilter');
         return $original->handle($request, $next);
     }
     $this->setAdminOrSiteLocale();
     return $next($request);
 }
开发者ID:bitsoflove,项目名称:Core,代码行数:10,代码来源:LocalizationMiddleware.php


示例6: newQuery

 public function newQuery()
 {
     $query = parent::newQuery();
     if (is_module_enabled('Site')) {
         $this->appendSiteWhereClause($query);
     }
     if (empty($this->auth->check())) {
         $this->appendPublicWhereClause($query);
     }
     return $query;
 }
开发者ID:bitsoflove,项目名称:Page,代码行数:11,代码来源:QueryLimiterTrait.php


示例7: createFromFile

 /**
  * Create a file row from the given file
  * @param  UploadedFile $file
  * @return mixed
  */
 public function createFromFile(UploadedFile $file)
 {
     $fileName = FileHelper::slug($file->getClientOriginalName());
     $exists = $this->model->whereFilename($fileName)->first();
     if ($exists) {
         $fileName = $this->getNewUniqueFilename($fileName);
     }
     $data = ['filename' => $fileName, 'path' => config('asgard.media.config.files-path') . "{$fileName}", 'extension' => substr(strrchr($fileName, "."), 1), 'mimetype' => $file->getClientMimeType(), 'filesize' => $file->getFileInfo()->getSize(), 'folder_id' => 0];
     if (is_module_enabled('Site')) {
         $siteId = Site::id();
         $data['site_id'] = $siteId;
         $data['path'] = config('asgard.media.config.files-path') . '/' . Site::current()->slug . "/{$fileName}";
     }
     return $this->model->create($data);
 }
开发者ID:bitsoflove,项目名称:Media,代码行数:20,代码来源:EloquentFileRepository.php


示例8: setActiveTheme

 /**
  * Set the active theme based on the settings
  */
 private function setActiveTheme()
 {
     if ($this->app->runningInConsole() || !app('asgard.isInstalled')) {
         return;
     }
     if ($this->inAdministration()) {
         $themeName = $this->app['config']->get('asgard.core.core.admin-theme');
         return $this->app['stylist']->activate($themeName, true);
     }
     //if multi site, then grab themeName from db
     if (is_module_enabled('Site')) {
         $currentLocale = \Site::currentLocale();
         //if(!empty($currentLocale)) {
         $themeName = $currentLocale->theme;
         //} else {
         //    \Log::warning('Invalid locale defined! ThemeServiceProvider@setActiveTeam');
         //    $themeName = $this->app['setting.settings']->get('core::template', null, 'Flatly');
         //}
     } else {
         $themeName = $this->app['setting.settings']->get('core::template', null, 'Flatly');
     }
     return $this->app['stylist']->activate($themeName, true);
 }
开发者ID:bitsoflove,项目名称:Setting,代码行数:26,代码来源:ThemeServiceProvider.php


示例9: is_mib_poller_enabled

function is_mib_poller_enabled($device)
{
    $val = get_dev_attrib($device, 'poll_mib');
    if ($val == null) {
        return is_module_enabled('poller', 'mib');
    }
    return $val;
}
开发者ID:greggcz,项目名称:librenms,代码行数:8,代码来源:common.php


示例10: env

	@endforeach

    <!-- Mainly scripts -->
    {!! Theme::script('js/bootstrap.min.js') !!}
    {!! Theme::script('js/plugins/metisMenu/jquery.metisMenu.js') !!}
    {!! Theme::script('js/plugins/slimscroll/jquery.slimscroll.min.js') !!}

    {!! Theme::script('vendor/alertify/build/alertify.min.js') !!}
    {!! Theme::script('js/mousetrap.min.js') !!}
    {!! Theme::script('js/jquery.slug.js') !!}

    <!-- Custom and plugin javascript -->
    {!! Theme::script('js/inspinia.js') !!}
	
	<?php 
if (is_module_enabled('Notification')) {
    ?>
	    <script src="https://js.pusher.com/3.0/pusher.min.js"></script>
	    <script src="{{ Module::asset('notification:js/pusherNotifications.js') }}"></script>
	    <script>
	        $(".notifications-list").pusherNotifications({
	            pusherKey: '{{ env('PUSHER_KEY') }}',
	            loggedInUserId: {{ $currentUser->id }}
	        });
	    </script>
	<?php 
}
?>

	@section('scripts')
	@show
开发者ID:notegame,项目名称:asgardcms,代码行数:31,代码来源:master.blade.php


示例11: createAll

 /**
  * Create all thumbnails for the given image path
  * @param string $path
  */
 public function createAll($path)
 {
     if (!$this->isImage($path)) {
         return;
     }
     foreach ($this->manager->all() as $thumbnail) {
         $image = $this->image->make($this->filesystem->disk($this->getConfiguredFilesystem())->get($this->getDestinationPath($path->getRelativeUrl())));
         if (is_module_enabled('Site')) {
             $filename = config('asgard.media.config.files-path') . Site::current()->slug . '/' . $this->newFilename($path, $thumbnail->name());
         } else {
             $filename = config('asgard.media.config.files-path') . $this->newFilename($path, $thumbnail->name());
         }
         foreach ($thumbnail->filters() as $manipulation => $options) {
             $image = $this->imageFactory->make($manipulation)->handle($image, $options);
         }
         $image = $image->stream(pathinfo($path, PATHINFO_EXTENSION));
         $this->writeImage($filename, $image);
     }
 }
开发者ID:bitsoflove,项目名称:Media,代码行数:23,代码来源:Imagy.php


示例12: array

if (isAuthorized('viewServers')) {
    $menu['servers_child'] = array('id' => 'servers_child', 'name' => _('Servers'), 'page' => 'servers.php', 'parent' => array('servers'));
    $menu['servers_unregistered'] = array('id' => 'servers_unregistered', 'name' => _('Unregistered Servers'), 'page' => 'servers.php?view=unregistered', 'parent' => array('servers'));
    $menu['servers_groups'] = array('id' => 'servers_groups', 'name' => _('Server Groups'), 'page' => 'serversgroup.php', 'parent' => array('servers'));
}
if (isAuthorized('viewSharedFolders')) {
    if (is_module_enabled('SharedFolderDB')) {
        $menu['sharedfolders'] = array('id' => 'sharedfolders', 'name' => _('Shared Folders'), 'page' => 'sharedfolders.php', 'parent' => array('servers'));
    }
}
if (isAuthorized('viewScripts')) {
    $menu['script'] = array('id' => 'script', 'name' => _('Login Scripts'), 'page' => 'script.php', 'parent' => array('servers'));
}
if (isAuthorized('viewSharedFolders')) {
    // it should be viewProfile
    if (is_module_enabled('ProfileDB')) {
        $menu['profile'] = array('id' => 'profiles', 'name' => _('Profiles'), 'page' => 'profiles.php', 'parent' => array('servers'));
    }
}
if (isAuthorized('viewUsers')) {
    $menu['user_child'] = array('id' => 'user_child', 'name' => _('Users'), 'page' => 'users.php', 'parent' => array('users'));
}
if (isAuthorized('viewUsersGroups')) {
    $menu['users_groups'] = array('id' => 'users_groups', 'name' => _('User Groups'), 'page' => 'usersgroup.php', 'parent' => array('users'));
}
if (isAuthorized('viewApplications')) {
    $menu['applications_child'] = array('id' => 'applications_child', 'name' => _('Applications'), 'page' => 'applications.php', 'parent' => array('applications'));
    $menu['applications_webapp'] = array('id' => 'applications_webapp', 'name' => _('Web Applications'), 'page' => 'applications_webapp.php', 'parent' => array('applications'));
}
if (isAuthorized('viewApplicationsGroups')) {
    $menu['applications_groups'] = array('id' => 'applications_groups', 'name' => _('Application Groups'), 'page' => 'appsgroup.php', 'parent' => array('applications'));
开发者ID:bloveing,项目名称:openulteo,代码行数:31,代码来源:page_template.php


示例13: show_manage


//.........这里部分代码省略.........
        echo '<td>' . $key . ' ' . $buffer . '</td>';
        if ($can_manage_usersgroups && !$extends_from_default) {
            echo '<td>';
            echo '<form action="actions.php" method="post" onsubmit="return confirm(\'' . _('Are you sure you want to delete this rule?') . '\');">';
            echo '<input type="hidden" name="name" value="UserGroup_PolicyRule" />';
            echo '<input type="hidden" name="action" value="del" />';
            echo '<input type="hidden" name="id" value="' . $group->id . '" />';
            echo '<input type="hidden" name="element" value="' . $key . '" />';
            echo '<input type="submit" value="' . _('Delete this rule') . '" />';
            echo '</form>';
            echo '</td>';
        }
        echo '</tr>';
    }
    if ($can_manage_usersgroups && count($policy_rules_disable) > 0 && array_search(false, $policy) !== false) {
        echo '<tr><form action="actions.php" method="post"><td>';
        echo '<input type="hidden" name="name" value="UserGroup_PolicyRule" />';
        echo '<input type="hidden" name="action" value="add" />';
        echo '<input type="hidden" name="id" value="' . $group->id . '" />';
        echo '<select name="element">';
        foreach ($policy as $key => $value) {
            if ($value === true) {
                continue;
            }
            echo '<option value="' . $key . '" >' . $key . '</option>';
        }
        echo '</select>';
        echo '</td><td><input type="submit" value="' . _('Add this rule') . '" /></td>';
        echo '</form></tr>';
    }
    echo '</table>';
    echo '</div>';
    echo '<br/>';
    if (is_module_enabled('SharedFolderDB')) {
        $all_sharedfolders = $_SESSION['service']->shared_folders_list();
        if (is_null($all_sharedfolders)) {
            $all_sharedfolders = array();
        }
        if (count($all_sharedfolders) > 0) {
            $available_sharedfolders = array();
            $used_sharedfolders = array();
            if ($group->hasAttribute('shared_folders')) {
                $data = $group->getAttribute('shared_folders');
                $mods_by_share = array();
                foreach ($data as $mode => $used_sharedfolders2) {
                    foreach ($used_sharedfolders2 as $share_id => $share_name) {
                        $used_sharedfolders[$share_id] = $share_name;
                        $mods_by_share[$share_id] = $mode;
                    }
                }
            }
            foreach ($all_sharedfolders as $sharedfolder) {
                if (array_key_exists($sharedfolder->id, $used_sharedfolders)) {
                    continue;
                }
                $available_sharedfolders[] = $sharedfolder;
            }
            echo '<br />';
            echo '<div>';
            echo '<h2>' . _('Shared Folders') . '</h1>';
            echo '<table border="0" cellspacing="1" cellpadding="3">';
            foreach ($used_sharedfolders as $sharedfolder_id => $sharedfolder_name) {
                echo '<tr>';
                echo '<td><a href="sharedfolders.php?action=manage&amp;id=' . $sharedfolder_id . '">' . $sharedfolder_name . '</a></td>';
                echo '<td>' . $mods_by_share[$sharedfolder_id] . '</td>';
                if ($can_manage_sharedfolders) {
开发者ID:bloveing,项目名称:openulteo,代码行数:67,代码来源:usersgroup.php


示例14: updateAndSyncRoles

 /**
  * @param $userId
  * @param $data
  * @param $roles
  * @internal param $user
  * @return mixed
  */
 public function updateAndSyncRoles($userId, $data, $roles)
 {
     $user = $this->user->find($userId);
     $this->checkForNewPassword($data);
     $this->checkForManualActivation($user, $data);
     $user = $user->fill($data);
     $user->save();
     if (is_module_enabled('Site')) {
         $user->syncSites($data);
     }
     event(new UserWasUpdated($user));
     if (!empty($roles)) {
         $user->roles()->sync($roles);
     }
 }
开发者ID:bitsoflove,项目名称:User,代码行数:22,代码来源:SentinelUserRepository.php


示例15: is_mib_poller_enabled

function is_mib_poller_enabled($device)
{
    if (!is_module_enabled('poller', 'mib')) {
        return false;
    }
    if (!is_dev_attrib_enabled($device, 'poll_mib')) {
        d_echo('MIB module disabled for ' . $device['hostname'] . "\n");
        return false;
    }
    return true;
}
开发者ID:BillTheBest,项目名称:librenms,代码行数:11,代码来源:common.php


示例16: applicationdb_is_writable

function applicationdb_is_writable()
{
    return is_module_enabled('ApplicationDB') && array_key_exists('writable', $_SESSION['configuration']['ApplicationDB']) && $_SESSION['configuration']['ApplicationDB']['writable'] === true;
}
开发者ID:bloveing,项目名称:openulteo,代码行数:4,代码来源:functions.inc.php


示例17:

<?php

/*
 * LibreNMS global MIB viewer
 *
 * Copyright (c) 2015 Gear Consulting Pty Ltd <[email protected]>
 *
 * Author: Paul Gear
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.  Please see LICENSE.txt at the top level of
 * the source code distribution for details.
 */
if (is_module_enabled('poller', 'mib')) {
    ?>

<h4><i class="fa fa-file-text-o"></i> All MIB definitions</h4>
<div class="table-responsive">
    <table id="mibs" class="table table-hover table-condensed mibs">
        <thead>
            <tr>
                <th data-column-id="module">Module</th>
                <th data-column-id="mib">MIB</th>
                <th data-column-id="object_type">Object Type</th>
                <th data-column-id="oid">Object Id</th>
                <th data-column-id="syntax">Syntax</th>
                <th data-column-id="description">Description</th>
                <!-- th data-column-id="max_access">Maximum Access</th>
                <th data-column-id="status">Status</th -->
开发者ID:awlx,项目名称:librenms,代码行数:31,代码来源:mibs.inc.php


示例18:

                        <ul class="dropdown-menu language-menu">
                            @foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
                                <li class="{{ App::getLocale() == $localeCode ? 'active' : '' }}">
                                    <a rel="alternate" lang="{{$localeCode}}" href="{{LaravelLocalization::getLocalizedURL($localeCode) }}">
                                        {!! $properties['native'] !!}
                                    </a>
                                </li>
                            @endforeach
                        </ul>

                    </li>
                @endif


            <?php 
if (is_module_enabled('Site')) {
    ?>
                @include('site::partials.dropdown')
            <?php 
}
?>



            <!-- User Account: style can be found in dropdown.less -->
            <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="glyphicon glyphicon-user"></i>
                    <span>
                        <?php 
if ($user->present()->fullname() != ' ') {
开发者ID:bitsoflove,项目名称:AdminLTE,代码行数:31,代码来源:top-nav.blade.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_month函数代码示例发布时间:2022-05-15
下一篇:
PHP is_module_active函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap