CoreFiles by mySites.guru
helper.php38 lines, 924 bytes, from Joomla_3.0.2-Stable-Full_Package.zip
Raw History Compare with 3.0.1
md5
beb99993aa08ebe480fb857995c4dd5c
sha1
46a755cd62bc3ffc0ef212a4b70cfcbbecff5bb2
sha256
132f6cef9626ea3c967e88744e4f7f346c716d813d9948817b1f6a62bf86fcd7
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_articles_categories
 *
 * @copyright   Copyright (C) 2005 - 2012 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)
	{
		$categories = JCategories::getInstance('Content');
		$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 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.