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


PHP PHPBoostErrors::module_not_installed方法代码示例

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


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

示例1: execute

 public function execute(HTTPRequestCustom $request)
 {
     $module_id = $request->get_getstring('module_id', '');
     if (empty($module_id)) {
         AppContext::get_response()->redirect(Environment::get_home_page());
     }
     $this->init();
     $module_category_id = $request->get_getint('module_category_id', 0);
     $feed_name = $request->get_getstring('feed_name', Feed::DEFAULT_FEED_NAME);
     $feed = new ATOM($module_id, $feed_name, $module_category_id);
     if ($feed !== null && $feed->is_in_cache()) {
         $this->tpl->put('SYNDICATION', $feed->read());
     } else {
         $eps = AppContext::get_extension_provider_service();
         if ($eps->provider_exists($module_id, FeedProvider::EXTENSION_POINT)) {
             $provider = $eps->get_provider($module_id);
             $feeds = $provider->feeds();
             $data = $feeds->get_feed_data_struct($module_category_id, $feed_name);
             if ($data === null) {
                 AppContext::get_response()->set_header('content-type', 'text/html');
                 DispatchManager::redirect(PHPBoostErrors::unexisting_element());
             } else {
                 $feed->load_data($data);
                 $feed->cache();
                 $this->tpl->put('SYNDICATION', $feed->export());
             }
         } else {
             DispatchManager::redirect(PHPBoostErrors::module_not_installed());
         }
     }
     return $this->build_response($this->tpl);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:32,代码来源:DisplayAtomSyndicationController.class.php

示例2: get_right_controller_regarding_authorizations

 public final function get_right_controller_regarding_authorizations()
 {
     if (ModulesManager::is_module_installed(Environment::get_running_module_name())) {
         $module = ModulesManager::get_module(Environment::get_running_module_name());
         if (!$module->is_activated()) {
             return PHPBoostErrors::module_not_activated();
         }
     } else {
         return PHPBoostErrors::module_not_installed();
     }
     return $this;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:12,代码来源:ModuleController.class.php

示例3: get_right_controller_regarding_authorizations

 public final function get_right_controller_regarding_authorizations()
 {
     if (!AppContext::get_current_user()->is_admin()) {
         return new UserLoginController(UserLoginController::ADMIN_LOGIN, substr(REWRITED_SCRIPT, strlen(GeneralConfig::load()->get_site_path())));
     } else {
         if (ModulesManager::is_module_installed(Environment::get_running_module_name())) {
             $module = ModulesManager::get_module(Environment::get_running_module_name());
             if (!$module->is_activated()) {
                 return PHPBoostErrors::module_not_activated();
             }
         } else {
             return PHPBoostErrors::module_not_installed();
         }
     }
     return $this;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:16,代码来源:AdminModuleController.class.php

示例4: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->module_id = $request->get_string('id_module', null);
     if ($this->module_installed()) {
         $this->build_form();
         if ($this->submit_button->has_been_submited() && $this->form->validate()) {
             $drop_files = $this->form->get_value('drop_files')->get_raw_value();
             $this->delete_module($drop_files);
         }
         $this->tpl->put('FORM', $this->form->display());
         return new AdminModulesDisplayResponse($this->tpl, $this->lang['modules.delete_module']);
     } else {
         $error_controller = PHPBoostErrors::module_not_installed();
         DispatchManager::redirect($error_controller);
     }
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:17,代码来源:AdminModuleDeleteController.class.php

示例5:

 *
 *
 ###################################################
 *
 * 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 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 ###################################################*/
require_once 'init.php';
$running_module_name = Environment::get_running_module_name();
if (!in_array($running_module_name, array('user', 'admin', 'kernel'))) {
    if (ModulesManager::is_module_installed($running_module_name)) {
        $module = ModulesManager::get_module($running_module_name);
        if (!$module->is_activated()) {
            DispatchManager::redirect(PHPBoostErrors::module_not_activated());
        }
    } else {
        DispatchManager::redirect(PHPBoostErrors::module_not_installed());
    }
}
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:31,代码来源:begin.php


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