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


PHP JoomFishManager::addIncludePath方法代码示例

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


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

示例1: getTranslateParams

 public static function getTranslateParams($type = '', $original, $translation, $fieldname, $fields = null)
 {
     JoomFishManager::addIncludePath(JOOMFISH_LIBPATH . DS . 'translateparams', 'translateparams');
     JoomFishManager::addIncludePath(JOOMFISH_LIBPATH . DS . 'contentelement' . DS . 'contentelements', 'translateparams');
     $paramsclass = "TranslateParams_" . $type;
     if (!class_exists($paramsclass)) {
         // Search for the class file in the include paths.
         jimport('joomla.filesystem.path');
         if ($path = JPath::find(JoomFishManager::addIncludePath('', 'translateparams'), strtolower($type) . '.php')) {
             include_once $path;
         } else {
             if ($path = JPath::find(JoomFishManager::addIncludePath('', 'translateparams'), $paramsclass . '.php')) {
                 include_once $path;
             }
         }
     }
     if (!class_exists($paramsclass)) {
         jimport('joomfish.translateparams.translateparams');
         $paramsclass = "TranslateParams";
     }
     return new $paramsclass($original, $translation, $fieldname, $fields);
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:22,代码来源:translateparams.php

示例2: getTranslationFilters

 /**
  * Load and instantiate all necessary translation fitler classes 
  */
 public static function getTranslationFilters($catid, $contentElement)
 {
     JoomFishManager::addIncludePath(JOOMFISH_LIBPATH . DS . 'translationfilter', 'translationfilter');
     JoomFishManager::addIncludePath(JOOMFISH_LIBPATH . DS . 'contentelement' . DS . 'contentelements', 'translationfilter');
     if (!$contentElement) {
         return array();
     }
     $filterNames = $contentElement->getAllFilters();
     if (count($filterNames) > 0) {
         $filterNames["reset"] = "reset";
     }
     $filters = array();
     foreach ($filterNames as $key => $value) {
         $filterType = "translation" . ucfirst(strtolower($key)) . "Filter";
         //$classFile =  JOOMFISH_LIBPATH .DS. 'contentelement' .DS. 'contentelements'.DS. "$filterType.php";
         if (!class_exists($filterType)) {
             /*if (file_exists($classFile))
             		include_once($classFile);*/
             // Search for the class file in the include paths.
             jimport('joomla.filesystem.path');
             if ($path = JPath::find(JoomFishManager::addIncludePath('', 'translationfilter'), strtolower($key) . '.php')) {
                 include_once $path;
             } else {
                 if ($path = JPath::find(JoomFishManager::addIncludePath('', 'translationfilter'), $filterType . '.php')) {
                     include_once $path;
                 }
             }
             if (!class_exists($filterType)) {
                 continue;
             }
         }
         $filters[strtolower($key)] = new $filterType($contentElement);
     }
     return $filters;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:38,代码来源:translationfilter.php


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