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


PHP JModelList::getItems方法代码示例

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


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

示例1: getPayments

 public function getPayments()
 {
     $payments = parent::getItems();
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $plugins = RSMembership::getPlugins();
     $return = array();
     foreach ($plugins as $paymentplugin => $name) {
         if (preg_match('#rsmembershipwire([0-9]+)#', $paymentplugin, $match)) {
             continue;
         }
         $tmp = new stdClass();
         $tmp->name = $name;
         $tmp->limitations = '';
         $className = 'plgSystem' . $paymentplugin;
         if (class_exists($className) && method_exists($className, 'getLimitations')) {
             $dispatcher = JDispatcher::getInstance();
             $plugin = new $className($dispatcher, array());
             $tmp->limitations = $plugin->getLimitations();
         }
         $query->clear();
         $query->select($db->qn('extension_id'))->from($db->qn('#__extensions'))->where($db->qn('type') . ' = ' . $db->q('plugin') . ' AND ' . $db->qn('client_id') . '= ' . $db->q('0') . ' AND ' . $db->qn('element') . ' = ' . $db->q($paymentplugin));
         $db->setQuery($query);
         $tmp->cid = $db->loadResult();
         $payments[] = $tmp;
     }
     return $payments;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:28,代码来源:payments.php

示例2: getItems

 /**
  * Method to get a list of items.
  *
  * @return  mixed  An array of objects on success, false on failure.
  */
 public function getItems()
 {
     // Get the list of items from the database.
     $items = parent::getItems();
     $client = JApplicationHelper::getClientInfo($this->getState('stfilter.client_id', 0));
     $lang = JFactory::getLanguage();
     // Loop through the results to add the XML metadata,
     // and load language support.
     foreach ($items as &$item) {
         $path = JPath::clean($client->path . '/modules/' . $item->module . '/' . $item->module . '.xml');
         if (file_exists($path)) {
             $item->xml = simplexml_load_file($path);
         } else {
             $item->xml = null;
         }
         // 1.5 Format; Core files or language packs then
         // 1.6 3PD Extension Support
         $lang->load($item->module . '.sys', $client->path, null, false, true) || $lang->load($item->module . '.sys', $client->path . '/modules/' . $item->module, null, false, true);
         $item->name = JText::_($item->name);
         if (isset($item->xml) && ($text = trim($item->xml->description))) {
             $item->desc = JText::_($text);
         } else {
             $item->desc = JText::_('COM_MODULES_NODESCRIPTION');
         }
     }
     $items = JArrayHelper::sortObjects($items, 'name', 1, true, true);
     // TODO: Use the cached XML from the extensions table?
     return $items;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:34,代码来源:select.php

示例3: getItems

 /**
  * Method to get an array of data items.
  *
  * @return  mixed  An array of data items on success, false on failure.
  */
 public function getItems()
 {
     // check in items
     $this->checkInNow();
     // load parent items
     $items = parent::getItems();
     // set values to display correctly.
     if (DemoHelper::checkArray($items)) {
         // get user object.
         $user = JFactory::getUser();
         foreach ($items as $nr => &$item) {
             $access = $user->authorise('look.access', 'com_demo.look.' . (int) $item->id) && $user->authorise('look.access', 'com_demo');
             if (!$access) {
                 unset($items[$nr]);
                 continue;
             }
         }
     }
     // set selection value to a translatable value
     if (DemoHelper::checkArray($items)) {
         foreach ($items as $nr => &$item) {
             // convert add
             $item->add = $this->selectionTranslation($item->add, 'add');
         }
     }
     // return items
     return $items;
 }
开发者ID:namibia,项目名称:demo-joomla-3-component,代码行数:33,代码来源:looks.php

示例4: getItems

	/**
	 * Override getItems method.
	 *
	 * @return  array
	 * @since   1.6
	 */
	public function getItems()
	{
		$groupId = $this->getState('filter.group_id');

		if (($assets = parent::getItems()) && $groupId)
		{

			$actions = $this->getDebugActions();

			foreach ($assets as &$asset)
			{
				$asset->checks = array();

				foreach ($actions as $action)
				{
					$name = $action[0];
					$level = $action[1];

					// Check that we check this action for the level of the asset.
					if ($action[1] === null || $action[1] >= $asset->level)
					{
						// We need to test this action.
						$asset->checks[$name] = JAccess::checkGroup($groupId, $action[0], $asset->name);
					}
					else
					{
						// We ignore this action.
						$asset->checks[$name] = 'skip';
					}
				}
			}
		}

		return $assets;
	}
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:41,代码来源:debuggroup.php

示例5: getItems

 /**
  * Get items
  *
  * @return array
  */
 public function getItems()
 {
     $this->setState('list.limit', 0);
     $items = parent::getItems();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     foreach ($items as $item) {
         switch ($item->setting_key) {
             case 'translation_method_1':
             case 'translation_method_2':
                 $query->clear()->select(array('id', 'name_constant'))->from('#__neno_translation_methods');
                 $db->setQuery($query);
                 $values = $db->loadObjectList();
                 $item->dropdown = JHtml::_('select.genericlist', $values, $item->setting_key, null, 'id', 'name_constant', $item->setting_value, false, true);
                 break;
             case 'schedule_task_option':
                 $values = array(array('value' => 'ajax', 'text' => 'COM_NENO_INSTALLATION_TASK_OPTION_AJAX_MODULE_TITLE'), array('value' => 'cron', 'text' => 'COM_NENO_INSTALLATION_TASK_OPTION_CRON_TITLE'), array('value' => 'disabled', 'text' => 'COM_NENO_INSTALLATION_TASK_OPTION_DISABLE_TITLE'));
                 $item->dropdown = JHtml::_('select.genericlist', $values, $item->setting_key, null, 'value', 'text', $item->setting_value, false, true);
                 break;
             case 'translator':
                 $query->clear()->select(array('translator_name AS value', 'translator_name AS text'))->from('#__neno_machine_translation_apis');
                 $db->setQuery($query);
                 $values = $db->loadObjectList();
                 $item->dropdown = JHtml::_('select.genericlist', $values, $item->setting_key, null, 'value', 'text', $item->setting_value, false, true);
                 break;
             case 'default_translate_action':
                 $values = array(array('value' => '0', 'text' => 'COM_NENO_SETTINGS_SETTING_OPTION_DEFAULT_TRANSLATE_ACTION_NO'), array('value' => '1', 'text' => 'COM_NENO_SETTINGS_SETTING_OPTION_DEFAULT_TRANSLATE_ACTION_COPY'), array('value' => '2', 'text' => 'COM_NENO_SETTINGS_SETTING_OPTION_DEFAULT_TRANSLATE_ACTION_TRANSLATE'));
                 $item->dropdown = JHtml::_('select.genericlist', $values, $item->setting_key, null, 'value', 'text', $item->setting_value, false, true);
                 break;
         }
     }
     return $items;
 }
开发者ID:javigomez,项目名称:neno,代码行数:38,代码来源:settings.php

示例6: getItems

 function getItems()
 {
     $items = parent::getItems();
     foreach ($items as &$item) {
     }
     return $items;
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:7,代码来源:cannedqueries.php

示例7: getItems

 /**
  * Method to get an array of data items.
  *
  * @return  mixed  An array of data items on success, false on failure.
  */
 public function getItems()
 {
     // check in items
     $this->checkInNow();
     // load parent items
     $items = parent::getItems();
     // set values to display correctly.
     if (CostbenefitprojectionHelper::checkArray($items)) {
         // get user object.
         $user = JFactory::getUser();
         foreach ($items as $nr => &$item) {
             $access = $user->authorise('company.access', 'com_costbenefitprojection.company.' . (int) $item->id) && $user->authorise('company.access', 'com_costbenefitprojection');
             if (!$access) {
                 unset($items[$nr]);
                 continue;
             }
         }
     }
     // set selection value to a translatable value
     if (CostbenefitprojectionHelper::checkArray($items)) {
         foreach ($items as $nr => &$item) {
             // convert department
             $item->department = $this->selectionTranslation($item->department, 'department');
             // convert per
             $item->per = $this->selectionTranslation($item->per, 'per');
         }
     }
     // return items
     return $items;
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:35,代码来源:companies.php

示例8: getItems

 /**
  * Method to get an array of data items.
  *
  * @return  mixed  An array of data items on success, false on failure.
  */
 public function getItems()
 {
     // check in items
     $this->checkInNow();
     // load parent items
     $items = parent::getItems();
     // set values to display correctly.
     if (ComponentbuilderHelper::checkArray($items)) {
         // get user object.
         $user = JFactory::getUser();
         foreach ($items as $nr => &$item) {
             $access = $user->authorise('dynamic_get.access', 'com_componentbuilder.dynamic_get.' . (int) $item->id) && $user->authorise('dynamic_get.access', 'com_componentbuilder');
             if (!$access) {
                 unset($items[$nr]);
                 continue;
             }
         }
     }
     // set selection value to a translatable value
     if (ComponentbuilderHelper::checkArray($items)) {
         foreach ($items as $nr => &$item) {
             // convert main_source
             $item->main_source = $this->selectionTranslation($item->main_source, 'main_source');
             // convert gettype
             $item->gettype = $this->selectionTranslation($item->gettype, 'gettype');
         }
     }
     // return items
     return $items;
 }
开发者ID:vdm-io,项目名称:Joomla-Component-Builder,代码行数:35,代码来源:dynamic_gets.php

示例9: testGetItemsReadsFromCache

 /**
  * Tests the getItems method.
  *
  * @since   3.4
  *
  * @return  void
  *
  * @testdox getItems() reads from object cache
  */
 public function testGetItemsReadsFromCache()
 {
     TestReflection::setValue($this->object, '__state_set', true);
     // Write value in "getItems" cache
     TestReflection::setValue($this->object, 'cache', array('8ca32876bd8539c7d3eb54bda89b5ac7' => array()));
     $this->assertSame(array(), $this->object->getItems());
 }
开发者ID:SysBind,项目名称:joomla-cms,代码行数:16,代码来源:JModelListTest.php

示例10: getItems

 /**
  * Method to get a list of items for a list of tags.
  *
  * @return  mixed  An array of objects on success, false on failure.
  *
  * @since   3.1
  */
 public function getItems()
 {
     // Invoke the parent getItems method to get the main list
     $items = parent::getItems();
     if (!empty($items)) {
         foreach ($items as $item) {
             $explodedTypeAlias = explode('.', $item->type_alias);
             $item->link = 'index.php?option=' . $explodedTypeAlias[0] . '&view=' . $explodedTypeAlias[1] . '&id=' . $item->content_item_id . ':' . $item->core_alias;
             // Get display date
             switch ($this->state->params->get('tag_list_show_date')) {
                 case 'modified':
                     $item->displayDate = $item->core_modified_time;
                     break;
                 case 'created':
                     $item->displayDate = $item->core_created_time;
                     break;
                 default:
                 case 'published':
                     $item->displayDate = $item->core_publish_up == 0 ? $item->core_created_time : $item->core_publish_up;
                     break;
             }
         }
         return $items;
     } else {
         return false;
     }
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:34,代码来源:tag.php

示例11: getItems

 /**
  * Method to get an array of data items.
  *
  * @return  array  An array of data items
  *
  * @since   12.2
  */
 public function getItems()
 {
     JDeveloperLoader::import("archive");
     $extension = JTable::getInstance("Extension", "JTable");
     // Get a storage key.
     $store = $this->getStoreId('getItems');
     // Load the list items.
     $items = parent::getItems();
     // Add information
     foreach ($items as $item) {
         // Is Component already installed?
         $item->createDir = JDeveloperArchive::getArchiveDir() . "/" . JDeveloperArchive::getArchiveName("mod_", $item->name, $item->version);
         $item->installed = JDeveloperInstall::isInstalled("module", "mod_" . $item->name);
         if ($item->installed) {
             $extension->load(array("name" => "mod_" . $item->name, "type" => "module"));
             $item->enabled = (bool) $extension->enabled;
         } else {
             $item->enabled = false;
         }
     }
     // If emtpy or an error, just return.
     if (empty($items)) {
         return array();
     }
     // Add the items to the internal cache.
     $this->cache[$store] = $items;
     return $this->cache[$store];
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:35,代码来源:modules.php

示例12: getItems

 public function getItems()
 {
     $items = parent::getItems();
     // If current realm list is empty populate from TC database
     if ($this->getTotal() <= 0) {
         $authdb = JTrinityCoreDBHelper::getAuthDBName();
         $sql = "SELECT id, name, address, port, population FROM " . $authdb . ".realmlist";
         $dbo = JTrinityCoreDBHelper::getDB();
         $dbo->setQuery($sql);
         $results = $dbo->loadObjectList();
         if (count($results)) {
             foreach ($results as $row) {
                 $data = new stdClass();
                 $data->id = NULL;
                 $data->realmid = $row->id;
                 $data->realmname = $row->name;
                 $data->ip = $row->address;
                 $data->port = $row->port;
                 $data->population = $row->population;
                 $this->_db->insertObject('#__jtc_realms', $data, 'id');
             }
             $items = parent::getItems();
         }
     }
     return $items;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:26,代码来源:realms.php

示例13: getItems

 public function getItems()
 {
     if ($items = parent::getItems()) {
         $component = JComponentHelper::getComponent('com_tz_portfolio_plus');
         $menus = JMenu::getInstance('site');
         $menu_assigned = array();
         if ($menu_items = $menus->getItems(array('component_id'), $component->id)) {
             if (count($menu_items)) {
                 foreach ($menu_items as $m) {
                     if (isset($m->params)) {
                         $params = $m->params;
                         if ($tpl_style_id = $params->get('tz_template_style_id')) {
                             if (!isset($menu_assigned[$tpl_style_id])) {
                                 $menu_assigned[$tpl_style_id] = 0;
                             }
                             $menu_assigned[$tpl_style_id]++;
                         }
                     }
                 }
             }
         }
         foreach ($items as $i => &$item) {
             $item->menu_assigned = 0;
             if (isset($menu_assigned[$item->id])) {
                 $item->menu_assigned = $menu_assigned[$item->id];
             }
         }
         return $items;
     }
     return false;
 }
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:31,代码来源:template_styles.php

示例14: getItems

 public function getItems()
 {
     $result = parent::getItems();
     if (is_array($result) && !empty($result[0])) {
         $item = $result[0];
         // Get comprehension info
         $item->comprenhensions = $this->_getComprehensionInfos($item->id);
         // Get compositions info
         $item->compositions = $this->_getCompositionInfos($item->id);
         // Get precises info
         $item->precises = $this->_getPrecisInfos($item->id);
         // Get grammar info
         $item->grammars = $this->_getGrammarInfos($item->id);
         // Get usage info
         $item->usages = $this->_getUsageInfos($item->id);
         // Get exercise info
         $item->exercises = $this->_getExerciseInfo($item->id);
         $displayType = 0;
         if (!empty($item->comprenhensions) && count($item->comprenhensions)) {
             $displayType &= 1;
         }
         if (!empty($item->compositions) && count($item->compositions) > 0) {
             $displayType &= 1;
         }
         $result = $item;
     }
     return $result;
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:28,代码来源:lessons.php

示例15: getItems

 function getItems()
 {
     $items = parent::getItems();
     foreach ($items as &$item) {
         $item = (array) $item;
     }
     return $items;
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:8,代码来源:tables.php


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