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


PHP JModelLegacy::addTablePath方法代码示例

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


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

示例1: __construct

 /**
  * Plugin that loads DJ-Mediatools gallery within content
  *
  * @param	string	The context of the content being passed to the plugin.
  * @param	object	The article object.  Note $article->text is also available
  * @param	object	The article params
  * @param	int		The 'page' number
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $lang = JFactory::getLanguage();
     $lang->load('com_djmediatools', JPATH_SITE, 'en-GB', false, false);
     $lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', 'en-GB', false, false);
     $lang->load('com_djmediatools', JPATH_SITE, null, true, false);
     $lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', null, true, false);
     jimport('joomla.application.module.helper');
     // Include the syndicate functions only once
     require_once JPATH_ROOT . '/components/com_djmediatools/helpers/helper.php';
     JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_djmediatools/models', 'DJMediatoolsModel');
     JModelLegacy::addTablePath(JPATH_ADMINISTRATOR . '/components/com_djmediatools/tables');
 }
开发者ID:chaudhary4k4,项目名称:modernstore,代码行数:22,代码来源:djmediatools.php

示例2: _load

 protected function _load($cid)
 {
     if (!isset(self::$galleries[$cid])) {
         self::$galleries[$cid] = '';
         jimport('joomla.application.module.helper');
         // Include the syndicate functions only once
         require_once JPATH_ROOT . '/components/com_djmediatools/helpers/helper.php';
         JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_djmediatools/models');
         JModelLegacy::addTablePath(JPATH_ADMINISTRATOR . '/components/com_djmediatools/tables');
         $model = JModelLegacy::getInstance('Categories', 'DJMediatoolsModel', array('ignore_request' => true));
         $model->setState('category.id', $cid);
         $model->setState('filter.published', 1);
         $params = $model->getParams(false);
         $category = $model->getItem();
         if ($category === false) {
             //JError::raiseError(404, JText::_('COM_DJMEDIATOOLS_ERROR_CATEGORY_NOT_FOUND'));
             return null;
         }
         $lang = JFactory::getLanguage();
         $lang->load('com_djmediatools', JPATH_SITE, 'en-GB', false, false);
         $lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', 'en-GB', false, false);
         $lang->load('com_djmediatools', JPATH_SITE, null, true, false);
         $lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', null, true, false);
         // get gallery slides and layout
         $helper = DJMediatoolsLayoutHelper::getInstance($params->get('layout', 'slideshow'));
         $mid = $category->id . 'p';
         $params->set('gallery_id', $mid);
         $params->set('category', $category->id);
         $params->set('source', $category->source);
         $params = $helper->getParams($params);
         $slides = $helper->getSlides($params);
         if ($slides) {
             $helper->addScripts($params);
             $helper->addStyles($params);
             $navigation = $helper->getNavigation($params);
         } else {
             return JText::_('COM_DJMEDIATOOLS_EMPTY_CATEGORY');
         }
         ob_start();
         require JModuleHelper::getLayoutPath('mod_djmediatools', $params->get('layout', 'slideshow'));
         self::$galleries[$cid] = ob_get_clean();
     }
     return self::$galleries[$cid];
 }
开发者ID:politik86,项目名称:test2,代码行数:44,代码来源:djmediatools.php

示例3: defined

 *
 * DJ-MediaTools 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 DJ-MediaTools. If not, see <http://www.gnu.org/licenses/>.
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once JPATH_ROOT . '/components/com_djmediatools/helpers/helper.php';
JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_djmediatools/models', 'DJMediatoolsModel');
JModelLegacy::addTablePath(JPATH_ADMINISTRATOR . '/components/com_djmediatools/tables');
$lang = JFactory::getLanguage();
$lang->load('com_djmediatools', JPATH_SITE, 'en-GB', false, false);
$lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', 'en-GB', false, false);
$lang->load('com_djmediatools', JPATH_SITE, null, true, false);
$lang->load('com_djmediatools', JPATH_SITE . '/components/com_djmediatools', null, true, false);
$model = JModelLegacy::getInstance('Categories', 'DJMediatoolsModel', array('ignore_request' => true));
$model->setState('category.id', $params->get('catid'));
$model->setState('filter.published', 1);
$cparams = $model->getParams(false);
$category = $model->getItem($params->get('catid'));
$cparams->merge($params);
$params = $cparams;
if ($category === false) {
    //JError::raiseError(404, JText::_('COM_DJMEDIATOOLS_ERROR_CATEGORY_NOT_FOUND'));
    return false;
开发者ID:kidaa30,项目名称:lojinha,代码行数:31,代码来源:mod_djmediatools.php

示例4: testAddTablePath

 /**
  * Tests the addTablePath method.
  *
  * @since   12.3
  *
  * @return  void
  */
 public function testAddTablePath()
 {
     // Just make sure this is null, since nothing is returned
     $this->assertNull(JModelLegacy::addTablePath('dummy/path'));
 }
开发者ID:karimzg,项目名称:joomla,代码行数:12,代码来源:JModelLegacyTest.php


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