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


PHP Modules::findNotInstalled方法代码示例

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


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

示例1: index

 /**
  * Show dashboard overview
  *
  * @param void
  * @return null
  */
 function index()
 {
     // Welcome message, displayed only to administrators
     if ($this->logged_user->isAdministrator() && ConfigOptions::getValue('show_welcome_message')) {
         $this->wireframe->addPageAction(lang('Hide Welcome Message'), assemble_url('admin_settings_hide_welcome_message'), null, array('method' => 'post', 'confirm' => lang('You are about to hide welcome message. If you wish to bring it back later on you can do it from General settings page in Administration. Hide now?')));
         $this->smarty->assign(array('show_welcome_message' => true, 'available_modules' => Modules::findNotInstalled()));
         //BOF: task 05 | AD
         $this->wireframe->addPageAction(lang('View All'), assemble_url('view_projects_info'));
         //EOF: task 05 | AD
         // Regular dashboard
     } else {
         if (Project::canAdd($this->logged_user)) {
             $this->wireframe->addPageAction(lang('New Project'), assemble_url('projects_add'));
             //BOF: task 05 | AD
             $this->wireframe->addPageAction(lang('View All'), assemble_url('view_projects_info'));
             //EOF: task 05 | AD
         }
         // if
         $this->wireframe->addRssFeed($this->owner_company->getName() . ' - ' . lang('Recent activities'), assemble_url('rss', array('token' => $this->logged_user->getToken(true))), FEED_RSS);
         $pinned_project_ids = PinnedProjects::findProjectIdsByUser($this->logged_user);
         if (is_foreachable($pinned_project_ids)) {
             $pinned_projects = Projects::findByIds($pinned_project_ids);
         } else {
             $pinned_projects = null;
         }
         // if
         $dashboard_sections = new NamedList();
         event_trigger('on_dashboard_sections', array(&$dashboard_sections, &$this->logged_user));
         $important_items = new NamedList();
         event_trigger('on_dashboard_important_section', array(&$important_items, &$this->logged_user));
         $this->smarty->assign(array('show_welcome_message' => false, 'important_items' => $important_items, 'pinned_projects' => $pinned_projects, 'dashboard_sections' => $dashboard_sections, 'online_users' => Users::findWhoIsOnline($this->logged_user), 'grouped_activities' => group_by_date(ActivityLogs::findActiveProjectsActivitiesByUser($this->logged_user, 20), $this->logged_user)));
     }
     // if
     //BOF:mod 20110623
     $tabs = new NamedList();
     $tabs->add('dashboard', array('text' => 'Active Teams', 'url' => assemble_url('dashboard')));
     $tabs->add('home_page', array('text' => 'Home Page', 'url' => assemble_url('goto_home_tab')));
     $tabs->add('assigned_action_request', array('text' => 'Assigned Action Requests', 'url' => assemble_url('assigned_action_request')));
     $tabs->add('owned_tickets', array('text' => 'Owned Tickets', 'url' => assemble_url('my_tickets')));
     $tabs->add('subscribed_tickets', array('text' => 'Subscribed Tickets', 'url' => assemble_url('my_subscribed_tickets')));
     $this->smarty->assign('page_tabs', $tabs);
     $this->smarty->assign('page_tab', 'dashboard');
     //EOF:mod 20110623
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:50,代码来源:DashboardController.class.php

示例2: index

 /**
  * Show modules administration index page
  *
  * @param void
  * @return null
  */
 function index()
 {
     $this->smarty->assign(array('modules' => Modules::findAll(), 'available_modules' => Modules::findNotInstalled()));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:10,代码来源:ModulesAdminController.class.php

示例3: define

<?php

define('PUBLIC_PATH', dirname(__FILE__));
$config_file = realpath(PUBLIC_PATH . '/../config/config.php');
if (is_file($config_file)) {
    require_once $config_file;
    ini_set("default_charset", "UTF-8");
    ini_set("error_reporting", "");
    require ROOT . '/angie.php';
    require ANGIE_PATH . '/init.php';
    $application =& application();
    $application->prepare(array('initialize_resources' => true, 'connect_to_database' => true, 'initialize_smarty' => true, 'init_modules' => true, 'authenticate' => true, 'init_locale' => true, 'load_hooks' => true));
    //array
    $application->init();
    include_once WEBDAV_MODULE_PATH . '/models/authenticate.php';
    $not_installed_modules = Modules::findNotInstalled();
    foreach ($not_installed_modules as $module) {
        if ($module->name == 'webdav') {
            header("HTTP/1.1 503 Service Unavailable");
            die('Module is not installed');
        }
    }
    if (!ConfigOptions::getValue('webdav_enabled')) {
        header("HTTP/1.1 503 Service Unavailable");
        die('Module has been disabled by administrator');
    }
    //if
    // Activate if your PHP is CGI mode
    $phpcgi = 0;
    $realm = 'activeCollab webdav area';
    $user = AuthenticationBasicHTTP($realm);
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:31,代码来源:webdav.php


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