CoreFiles by mySites.guru
emptystate.php28 lines, 870 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
20bf996478fcdc9826b2eb531681e05f
sha1
276d0e86d917624bebb1351bec60ee3afdc32866
sha256
068e34c9d910e1f6a75d458df3c6ccaccb9633e986254772a61a0db7fa772298
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   (C) 2008 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=featured',
    'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Adding_a_new_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 78 releases, Joomla 4.2.0-beta3 to 5.0.0-alpha3. See them all, or every version of this file.