CoreFiles by mySites.guru
helper.php38 lines, 925 bytes, from Joomla_3.0.4-Stable-Full_Package.zip
Raw History Compare with 3.0.3
md5
4475bd8392b8f5d7e9215225cb8b5443
sha1
2f6d492f500f44fd6c418fd230b705eddb33068f
sha256
2c4d5c5b62e994eb35f1f7b3781633d446165600e6b935c4361a58078a7e0175
<?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)
	{
		$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 2 releases, Joomla 3.0.3 to 3.0.4. See them all, or every version of this file.