[ 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 Templates.Atum 6 * 7 * @copyright (C) 2019 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\Router\Route; 16 use Joomla\CMS\Uri\Uri; 17 18 $module = $displayData['module']; 19 $params = $displayData['params']; 20 $attribs = $displayData['attribs']; 21 22 if ((string) $module->content === '') { 23 return; 24 } 25 26 $id = $module->id; 27 28 // Permission checks 29 $user = Factory::getUser(); 30 $canEdit = $user->authorise('core.edit', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules'); 31 $canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules'); 32 33 $moduleTag = $params->get('module_tag', 'div'); 34 $bootstrapSize = (int) $params->get('bootstrap_size', 12); 35 $moduleClass = $bootstrapSize ? 'col-md-' . $bootstrapSize : 'col-md-12'; 36 $headerTag = htmlspecialchars($params->get('header_tag', 'h2'), ENT_QUOTES, 'UTF-8'); 37 $moduleClassSfx = $params->get('moduleclass_sfx', ''); 38 39 // Temporarily store header class in variable 40 $headerClass = $params->get('header_class') ? ' class="' . htmlspecialchars($params->get('header_class'), ENT_QUOTES, 'UTF-8') . '"' : ''; 41 42 // Get the module icon 43 $headerIcon = $params->get('header_icon') ? '<span class="' . htmlspecialchars($params->get('header_icon'), ENT_QUOTES, 'UTF-8') . '" aria-hidden="true"></span>' : ''; 44 45 ?> 46 <div class="<?php echo $moduleClass; ?> module-wrapper"> 47 <<?php echo $moduleTag; ?> class="card mb-3 <?php echo $moduleClassSfx; ?>"> 48 <?php if ($canEdit || $canChange || $headerIcon || $module->showtitle) : ?> 49 <div class="card-header"> 50 <?php if ($canEdit || $canChange) : ?> 51 <?php $dropdownPosition = Factory::getLanguage()->isRtl() ? 'start' : 'end'; ?> 52 <div class="module-actions dropdown"> 53 <button type="button" data-bs-toggle="dropdown" data-bs-display="static" aria-haspopup="true" aria-expanded="false" class="btn" id="dropdownMenuButton-<?php echo $id; ?>"> 54 <span class="icon-cogs" aria-hidden="true"></span> 55 <span class="visually-hidden"><?php echo Text::sprintf('JACTION_EDIT_MODULE', $module->title); ?></span> 56 </button> 57 <div class="dropdown-menu dropdown-menu-<?php echo $dropdownPosition; ?>" aria-labelledby="dropdownMenuButton-<?php echo $id; ?>"> 58 <?php if ($canEdit) : ?> 59 <?php $uri = Uri::getInstance(); ?> 60 <?php $url = Route::_('index.php?option=com_modules&task=module.edit&id=' . $id . '&return=' . base64_encode($uri)); ?> 61 <a class="dropdown-item" href="<?php echo $url; ?>"><?php echo Text::_('JACTION_EDIT'); ?></a> 62 <?php endif; ?> 63 <?php if ($canChange) : ?> 64 <button type="button" class="dropdown-item unpublish-module" data-module-id="<?php echo $id; ?>"><?php echo Text::_('JACTION_UNPUBLISH'); ?></button> 65 <?php endif; ?> 66 </div> 67 </div> 68 <?php endif; ?> 69 70 <?php if ($module->showtitle) : ?> 71 <<?php echo $headerTag; ?><?php echo $headerClass; ?>> 72 <?php echo $headerIcon; ?> 73 <?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?> 74 </<?php echo $headerTag; ?>> 75 <?php endif; ?> 76 </div> 77 <?php endif; ?> 78 <div class="card-body"> 79 <?php echo $module->content; ?> 80 </div> 81 </<?php echo $moduleTag; ?>> 82 </div>
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 |