當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。