CoreFiles by mySites.guru
emptystate.php29 lines, 895 bytes, from Joomla_4.0.2-Stable-Full_Package.zip
Raw History Compare with 4.0.1
md5
b77e8cac67ee5037d9dd7753cc71b37a
sha1
a62ecce1610dd28b884961db1d56df6dadded6b8
sha256
8498e164adac5889d9d0ec8657980d9ab7d231e19e30144ef8b37f50c139acdf
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   (C) 2021 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\Factory;
use Joomla\CMS\Layout\LayoutHelper;

$displayData = [
	'textPrefix' => 'COM_CONTENT',
	'formURL'    => 'index.php?option=com_content&view=articles',
	'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Adding_a_new_article',
	'icon'       => 'icon-copy article',
];

$user = Factory::getApplication()->getIdentity();

if ($user->authorise('core.create', 'com_content') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0)
{
	$displayData['createURL'] = 'index.php?option=com_content&task=article.add';
}

echo LayoutHelper::render('joomla.content.emptystate', $displayData);

The same content is in 49 releases, Joomla 4.0.0-rc1 to 4.2.0-beta2. See them all, or every version of this file.