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