CoreFiles by mySites.guru
helper.php41 lines, 1,014 bytes, from Joomla_3.2.0-Stable-Full_Package.zip
Raw History Compare with 3.1.6
md5
b257e142ae8c79b915f48f6a3cf0b1e5
sha1
5c2b74a327ae097a534de59c96c680ff54a48355
sha256
df897eb59055c93d2c81347a68465363bc2e5b7ec3ee617abe53dac9df634ea5
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 *
 * @copyright   Copyright (C) 2005 - 2013 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.0 to 3.2.1. See them all, or every version of this file.