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


PHP JModuleHelper::getModuleList方法代码示例

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


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

示例1: loadElementAssets

 private static function loadElementAssets()
 {
     //BEGIN compress
     $app = JFactory::getApplication();
     $doc = JFactory::getDocument();
     // Require base shorcode element
     self::requireBaseShortCodeElement();
     $JSNPbElements = new JSNPagebuilderHelpersElements();
     if ($doc instanceof JDocumentHTML) {
         $content = $doc->getBuffer('component');
         $modules = JModuleHelper::getModuleList();
         if (count($modules)) {
             foreach ($modules as $module) {
                 if (trim($module->content) != '') {
                     $content .= $module->content;
                 }
             }
         }
         $content = str_replace('$', '$', $content);
         $helper = new JSNPagebuilderHelpersBuilder();
         $elementClass = $helper->getShortCodeClassBeforeRender($content);
         if (!$app->isAdmin()) {
             JHtml::_('jquery.framework');
             $doc->addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . 'js/joomlashine.noconflict.js', 'text/javascript');
             $doc->addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/bootstrap3/js/bootstrap.min.js', 'text/javascript');
             //$doc->addScript( JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/scrollreveal/scrollReveal.js', 'text/javascript' );
             $doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/bootstrap3/css/bootstrap.min.css', 'text/css');
             $doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/pagebuilder.css', 'text/css');
             $doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/jsn-gui-frontend.css', 'text/css');
             $doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/front_end.css', 'text/css');
             $doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/front_end_responsive.css', 'text/css');
         }
         if (is_array($elementClass) && count($elementClass) > 0) {
             foreach ($elementClass as $class) {
                 $instance = new $class();
                 if (method_exists($instance, 'load_assets_frontend')) {
                     $instance->load_assets_frontend();
                 }
             }
         }
     }
 }
开发者ID:jovielarmario,项目名称:albay_cms,代码行数:42,代码来源:pagebuilder.php

示例2: foreach

 protected function &getModuleList()
 {
     if ($this->modules === null) {
         $modules = \JModuleHelper::getModuleList();
         $this->modules = [];
         foreach ($modules as $module) {
             $this->modules[$module->id] = $module;
         }
     }
     return $this->modules;
 }
开发者ID:rimade,项目名称:gantry5,代码行数:11,代码来源:Platform.php

示例3: defined

<?php

/**
 * @package     Alligo.Modules
 * @subpackage  mod_banners4varnish
 *
 * @copyright   Copyright (C) 2005 - 2015 Alligo Ltda. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$modules = JModuleHelper::getModuleList();
$id_modulo = null;
foreach ($modules as $module) {
    if ($module->module === 'mod_banners4varnish') {
        if ($module->params) {
            $registry = new JRegistry();
            $module_params = $registry->loadString($module->params);
            // Esse modulo não recebe ID de uma forma amigável. Infelismente, é necessário
            // descobrir por força quase bruta
            if ($module_params['catid'] === $params['catid'] && $module_params['ordering'] === $params['ordering'] && $module_params['header_text'] === $params['header_text'] && $module_params['footer_text'] === $params['footer_text'] && $module_params['moduleclass_sfx'] === $params['moduleclass_sfx']) {
                $id_modulo = $module->id;
                break;
            }
        }
    }
}
if (!empty($id_modulo)) {
    ?>
<div class="banner-ajax" id="banner-ajax<?php 
    echo $id_modulo;
    ?>
开发者ID:alligo,项目名称:joomla_mod_banners4varnish,代码行数:31,代码来源:ajax.php


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