當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JModelList::addIncludePath方法代碼示例

本文整理匯總了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');
 }
開發者ID:joshjim27,項目名稱:jobsglobal,代碼行數:15,代碼來源:controller.php

示例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;
開發者ID:templaza,項目名稱:tz_portfolio_plus,代碼行數:30,代碼來源:fieldgroups.php


注:本文中的JModelList::addIncludePath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。