CoreFiles by mySites.guru
helper.php53 lines, 1,191 bytes, from Joomla_3.3.4-Stable-Full_Package.zip
Raw History Compare with 3.3.3
md5
336e5fc4479a015f93cba1bdf46f550e
sha1
4fdd6139a6298e8fa786bc30dc8378b6dc90b0ea
sha256
9327293c0830485530ab55f33100d982b1731af979ccd82fc6ad8ebe0bc669fa
<?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
 *
 * @since       1.5
 */
abstract class ModArticlesCategoriesHelper
{
	/**
	 * Get list of articles
	 *
	 * @param   JRegistry  &$params  module parameters
	 *
	 * @return  array
	 *
	 * @since   1.5
	 */
	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 3 releases, Joomla 3.3.4 to 3.3.6. See them all, or every version of this file.