30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-06-03 06:50:49 +00:00
weblinks/src/administrator/components/com_weblinks/tmpl/weblinks/emptystate.php

28 lines
985 B
PHP
Raw Normal View History

2021-09-24 05:49:35 +00:00
<?php
2023-05-18 16:45:59 +00:00
2021-09-24 05:49:35 +00:00
/**
* @package Joomla.Administrator
* @subpackage Weblinks
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
2023-05-18 16:45:59 +00:00
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
2021-09-24 05:49:35 +00:00
use Joomla\CMS\Factory;
use Joomla\CMS\Layout\LayoutHelper;
$displayData = [
2023-05-18 16:45:59 +00:00
'textPrefix' => 'COM_WEBLINKS',
'formURL' => 'index.php?option=com_weblinks',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Help4.x:Weblinks',
'icon' => 'icon-globe weblink',
2021-09-24 05:49:35 +00:00
];
$user = Factory::getApplication()->getIdentity();
2023-05-18 16:45:59 +00:00
if ($user->authorise('core.create', 'com_weblinks') || count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0) {
$displayData['createURL'] = 'index.php?option=com_weblinks&task=weblink.add';
2021-09-24 05:49:35 +00:00
}
2023-05-18 16:45:59 +00:00
echo LayoutHelper::render('joomla.content.emptystate', $displayData);