CoreFiles by mySites.guru
helper.php41 lines, 1,014 bytes, from Joomla_3.2.3-Stable-Full_Package.zip
Raw History Compare with 3.2.2
md5
d77019b9f12f63ce96578198597837f4
sha1
eca8d854ffee78d92bc49042b3ee051d307ea961
sha256
6f0cb6668a9a1deaae1afdfc4efb8495f69c7b3de31794df9b5cdb9d6031c583
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

require_once JPATH_SITE.'/components/com_content/helpers/route.php';

/**
 * Helper for mod_articles_categories
 *
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 */
abstract class ModArticlesCategoriesHelper
{
	public static function getList(&$params)
	{
		$options = array();
		$options['countItems'] = $params->get('numitems', 0);

		$categories = JCategories::getInstance('Content', $options);
		$category = $categories->get($params->get('parent', 'root'));

		if ($category != null)
		{
			$items = $category->getChildren();
			if ($params->get('count', 0) > 0 && count($items) > $params->get('count', 0))
			{
				$items = array_slice($items, 0, $params->get('count', 0));
			}
			return $items;
		}
	}

}

The same content is in 2 releases, Joomla 3.2.2 to 3.2.3. See them all, or every version of this file.