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


PHP JController::addModelPath方法代码示例

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


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

示例1: testAddModelPath

 /**
  * Test JController::addModelPath
  *
  * @since	11.3
  *
  * @covers  JController::addModelPath
  */
 public function testAddModelPath()
 {
     $path = JPath::clean(JPATH_ROOT . '/addmodelpath');
     JController::addModelPath($path);
     // The default path is the class file folder/forms
     $valid = JPATH_PLATFORM . '/joomla/form/fields';
     $this->assertThat(in_array($path, JModel::addIncludePath()), $this->isTrue(), 'Line:' . __LINE__ . ' The path should be added to the JModel paths.');
 }
开发者ID:nogsus,项目名称:joomla-platform,代码行数:15,代码来源:JControllerTest.php

示例2: testAddModelPath

 /**
  * Test JController::addModelPath
  *
  * @since	1.6
  */
 public function testAddModelPath()
 {
     // Include JModel as this method is a proxy for JModel::addIncludePath
     require_once JPATH_PLATFORM . '/joomla/application/component/model.php';
     $path = JPATH_ROOT . '/addmodelpath';
     JController::addModelPath($path);
     // The default path is the class file folder/forms
     $valid = JPATH_PLATFORM . '/joomla/form/fields';
     $this->assertThat(in_array($path, JModel::addIncludePath()), $this->isTrue(), 'Line:' . __LINE__ . ' The path should be added to the JModel paths.');
 }
开发者ID:nibra,项目名称:joomla-platform,代码行数:15,代码来源:JControllerTest.php

示例3: testAddModelPath

 /**
  * Test JController::addModelPath
  *
  * @since	1.6
  */
 public function testAddModelPath()
 {
     // Include JModel as this method is a proxy for JModel::addIncludePath
     require_once JPATH_BASE . '/libraries/joomla/application/component/model.php';
     $path = dirname(__FILE__) . DS . 'addmodelpath';
     JController::addModelPath($path);
     // The default path is the class file folder/forms
     $valid = JPATH_LIBRARIES . DS . 'joomla' . DS . 'form/fields';
     $this->assertThat(in_array($path, JModel::addIncludePath()), $this->isTrue(), 'Line:' . __LINE__ . ' The path should be added to the JModel paths.');
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:15,代码来源:JControllerTest.php

示例4: Submitters

 public function Submitters()
 {
     $mainframe =& JFactory::getApplication();
     $mainframe->redirect('index.php?option=com_redform&controller=submitters&task=submitters&integration=redevent&xref=' . JRequest::getInt('xref') . '&form_id=' . JRequest::getInt('form_id') . '&filter=' . JRequest::getInt('filter'));
     /* Create the view object */
     $view = $this->getView('submitters', 'html');
     /* Standard model */
     JController::addModelPath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_redform' . DS . 'models');
     $view->setModel($this->getModel('submitters', 'RedformModel'), true);
     $view->setModel($this->getModel('redform', 'RedformModel'));
     $view->setLayout('submitters');
     /* Now display the view */
     $view->display();
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:14,代码来源:attendees.php


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