[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_categories 6 * 7 * @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 defined('_JEXEC') or die; 12 13 use Joomla\CMS\Factory; 14 use Joomla\CMS\Language\Text; 15 use Joomla\CMS\Layout\LayoutHelper; 16 17 $extension = $this->state->get('filter.extension'); 18 $component = $this->state->get('filter.component'); 19 $section = $this->state->get('filter.section'); 20 21 // Special handling for the title as com_categories is a service component for many other components. Copied from the categories view. 22 $lang = Factory::getApplication()->getLanguage(); 23 $lang->load($component, JPATH_BASE) 24 || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component); 25 26 // If a component categories title string is present, let's use it. 27 if ($lang->hasKey($component_title_key = strtoupper($component . ($section ? "_$section" : '')) . '_CATEGORIES_TITLE')) { 28 $title = Text::_($component_title_key); 29 } elseif ($lang->hasKey($component_section_key = strtoupper($component . ($section ? "_$section" : '')))) { 30 // Else if the component section string exists, let's use it 31 $title = Text::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(Text::_($component_section_key))); 32 } else // Else use the base title 33 { 34 $title = Text::_('COM_CATEGORIES_CATEGORIES_BASE_TITLE'); 35 } 36 37 $displayData = [ 38 'textPrefix' => 'COM_CATEGORIES', 39 'formURL' => 'index.php?option=com_categories&extension=' . $extension, 40 'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Category', 41 'title' => $title, 42 'icon' => 'icon-folder categories content-categories', 43 ]; 44 45 if (Factory::getApplication()->getIdentity()->authorise('core.create', $extension)) { 46 $displayData['createURL'] = 'index.php?option=com_categories&extension=' . $extension . '&task=category.add'; 47 } 48 49 echo LayoutHelper::render('joomla.content.emptystate', $displayData);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |