[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage Templates.cassiopeia 6 * 7 * @copyright (C) 2020 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\Utilities\ArrayHelper; 14 15 $module = $displayData['module']; 16 $params = $displayData['params']; 17 $attribs = $displayData['attribs']; 18 19 if ($module->content === null || $module->content === '') { 20 return; 21 } 22 23 $moduleTag = $params->get('module_tag', 'div'); 24 $moduleAttribs = []; 25 $moduleAttribs['class'] = $module->position . ' no-card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8'); 26 $headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8'); 27 $headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8'); 28 $headerAttribs = []; 29 30 // Only output a header class if one is set 31 if ($headerClass !== '') { 32 $headerAttribs['class'] = $headerClass; 33 } 34 35 // Only add aria if the moduleTag is not a div 36 if ($moduleTag !== 'div') { 37 if ($module->showtitle) : 38 $moduleAttribs['aria-labelledby'] = 'mod-' . $module->id; 39 $headerAttribs['id'] = 'mod-' . $module->id; 40 else : 41 $moduleAttribs['aria-label'] = $module->title; 42 endif; 43 } 44 45 $header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>'; 46 ?> 47 <<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>> 48 <?php if ($module->showtitle) : ?> 49 <?php echo $header; ?> 50 <?php endif; ?> 51 <?php echo $module->content; ?> 52 </<?php echo $moduleTag; ?>>
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 |