Source for file helper.php
Documentation is available at helper.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Joomla.Administrator
* Get a list of articles.
* @param JRegistry &$params The module parameters.
* @return mixed An array of articles, or false on error.
public static function getList(&$params)
// Get an instance of the generic articles model
$model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' .
' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state');
switch ($params->get('ordering'))
$model->setState('list.ordering', 'modified DESC, created');
$model->setState('list.direction', 'DESC');
$model->setState('list.ordering', 'created');
$model->setState('list.direction', 'DESC');
$categoryId =
$params->get('catid');
$model->setState('filter.category_id', $categoryId);
$userId =
$user->get('id');
switch ($params->get('user_id'))
$model->setState('filter.author_id', $userId);
$model->setState('filter.author_id', $userId);
$model->setState('filter.author_id.include', false);
// Set the Start and Limit
$model->setState('list.start', 0);
$model->setState('list.limit', $params->get('count', 5));
$items =
$model->getItems();
if ($error =
$model->getError())
foreach ($items as &$item)
if ($user->authorise('core.edit', 'com_content.article.' .
$item->id))
$item->link =
JRoute::_('index.php?option=com_content&task=article.edit&id=' .
$item->id);
* Get the alternate title for the module.
* @param JRegistry $params The module parameters.
* @return string The alternate title for the module.
public static function getTitle($params)
$who =
$params->get('user_id');
$catid = (int)
$params->get('catid');
$type =
$params->get('ordering') ==
'c_dsc' ?
'_CREATED' :
'_MODIFIED';
$title =
$category->title;
$title =
JText::_('MOD_POPULAR_UNEXISTING');
return JText::plural('MOD_LATEST_TITLE' .
$type .
($catid ?
"_CATEGORY" :
'') .
($who !=
'0' ?
"_$who" :
''), (int)
$params->get('count'), $title);
Documentation generated on Tue, 19 Nov 2013 15:04:23 +0100 by phpDocumentor 1.4.3