本文整理匯總了PHP中JModelList::addIncludePath方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModelList::addIncludePath方法的具體用法?PHP JModelList::addIncludePath怎麽用?PHP JModelList::addIncludePath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JModelList
的用法示例。
在下文中一共展示了JModelList::addIncludePath方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Base Controller Constructor
*
* @param array $config Controller initialization configuration parameters
* @return void
* @since 0.1
*/
public function __construct($config = array())
{
parent::__construct();
$app = JFactory::getApplication();
$this->set('option', $app->input->get('option', '', 'STRING'));
JModelList::addIncludePath(JPATH_SITE . '/components/com_api/models');
JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_api/tables');
}
示例2: Copyright
# author DuongTVTemPlaza
# copyright Copyright (C) 2015 templaza.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.templaza.com
# Technical Support: Forum - http://templaza.com/Forum
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die;
JFormHelper::loadFieldClass('list');
JModelList::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_jvisualcontent/models');
class JFormFieldFieldGroups extends JFormFieldList
{
protected $type = 'FieldGroups';
protected function getOptions()
{
$options = array();
$model = JModelList::getInstance('Groups', 'TZ_Portfolio_PlusModel', array('ignore_request' => true));
// $model -> setState('filter.published','*');
if ($items = $model->getItems()) {
foreach ($items as $i => $item) {
$options[$i] = new stdClass();
$options[$i]->value = $item->id;
// if ($item -> published == 1)
// {
$options[$i]->text = $item->name;