CoreFiles by mySites.guru
mod_latest.php37 lines, 975 bytes, from Joomla_4.0.4-Stable-Full_Package.zip
Raw History Compare with 4.0.3
md5
b2f4b552acc6da0cc6361e7fd56525ce
sha1
052c7dde777c91bba3b8f8051b5f0975c77e2799
sha256
bcf5724158ae65c06ba04e6881eea8b3b723687f20438006411e8abd8f7b4968
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_latest
 *
 * @copyright   (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\Module\Latest\Administrator\Helper\LatestHelper;

$model = $app->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
$list = LatestHelper::getList($params, $model);

if ($params->get('automatic_title', 0))
{
	$module->title = LatestHelper::getTitle($params);
}

if (count($list))
{
	require ModuleHelper::getLayoutPath('mod_latest', $params->get('layout', 'default'));
}
else
{
	$app->getLanguage()->load('com_content');

	echo LayoutHelper::render('joomla.content.emptystate_module', [
			'textPrefix' => 'COM_CONTENT',
			'icon'       => 'icon-copy',
		]
	);
}

The same content is in 40 releases, Joomla 4.0.0-rc2 to 4.2.0-alpha2. See them all, or every version of this file.