CoreFiles by mySites.guru
emptystate.php29 lines, 885 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
bc7985bb6dbe0336cff725178d9d07de
sha1
30053727f755890e25bf68462e3500bbf2219ec7
sha256
03abaf33509257ef62965df749aed93af595dcdc151d33fd35c0bf474f50b3e2
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 *
 * @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_CONTACT',
	'formURL'    => 'index.php?option=com_contact',
	'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Help4.x:Contacts',
	'icon'       => 'icon-address-book contact',
];

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

if ($user->authorise('core.create', 'com_contact') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0)
{
	$displayData['createURL'] = 'index.php?option=com_contact&task=contact.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.