1<?php 2/** 3 * @package Joomla.Site 4 * @subpackage Layout 5 * 6 * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10defined('_JEXEC') or die; 11 12extract($displayData); 13 14/** 15 * Layout variables 16 * ------------------ 17 * @param string $selector Unique DOM identifier for the modal. CSS id without # 18 * @param array $params Modal parameters. Default supported parameters: 19 * - title string The modal title 20 * - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true) 21 * The string 'static' includes a backdrop which doesn't close the modal on click. 22 * - keyboard boolean Closes the modal when escape key is pressed (default = true) 23 * - closeButton boolean Display modal close button (default = true) 24 * - animation boolean Fade in from the top of the page (default = true) 25 * - footer string Optional markup for the modal footer 26 * - url string URL of a resource to be inserted as an <iframe> inside the modal body 27 * - height string height of the <iframe> containing the remote resource 28 * - width string width of the <iframe> containing the remote resource 29 * - bodyHeight int Optional height of the modal body in viewport units (vh) 30 * - modalWidth int Optional width of the modal in viewport units (vh) 31 * @param string $body Markup for the modal body. Appended after the <iframe> if the URL option is set 32 * 33 */ 34 35$bodyClass = 'modal-body'; 36 37$bodyHeight = isset($params['bodyHeight']) ? round((int) $params['bodyHeight'], -1) : ''; 38 39if ($bodyHeight && $bodyHeight >= 20 && $bodyHeight < 90) 40{ 41 $bodyClass .= ' jviewport-height' . $bodyHeight; 42} 43?> 44<div class="<?php echo $bodyClass; ?>"> 45 <?php echo $body; ?> 46</div> 47