本文整理汇总了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;