CoreFiles by mySites.guru
emptystate.php29 lines, 911 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
adffa3a77c4009ac4caf400cbc986759
sha1
49c0e433a85af0f321f36418d82e5a03b0222aaa
sha256
a99a9a66ff2bbc603dc49d61989c09b7df21254707f2d04e9569c4e88f650fdd
<?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 78 releases, Joomla 4.2.0-beta3 to 5.0.0-alpha3. See them all, or every version of this file.