[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/libraries/html/bootstrap/modal/ -> iframe.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   6   *
   7   * @copyright   (C) 2015 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  extract($displayData);
  16  
  17  /**
  18   * Layout variables
  19   * -----------------
  20   * @var   string  $selector  Unique DOM identifier for the modal. CSS id without #
  21   * @var   array   $params    Modal parameters. Default supported parameters:
  22   *                             - title        string   The modal title
  23   *                             - backdrop     mixed    A boolean select if a modal-backdrop element should be included (default = true)
  24   *                                                     The string 'static' includes a backdrop which doesn't close the modal on click.
  25   *                             - keyboard     boolean  Closes the modal when escape key is pressed (default = true)
  26   *                             - closeButton  boolean  Display modal close button (default = true)
  27   *                             - animation    boolean  Fade in from the top of the page (default = true)
  28   *                             - footer       string   Optional markup for the modal footer
  29   *                             - url          string   URL of a resource to be inserted as an <iframe> inside the modal body
  30   *                             - height       string   height of the <iframe> containing the remote resource
  31   *                             - width        string   width of the <iframe> containing the remote resource
  32   * @var   string  $body      Markup for the modal body. Appended after the <iframe> if the URL option is set
  33   */
  34  
  35  $iframeAttributes = array(
  36      'class' => 'iframe',
  37      'src'   => $params['url']
  38  );
  39  
  40  if (isset($params['title'])) {
  41      $iframeAttributes['name'] = addslashes($params['title']);
  42      $iframeAttributes['title'] = addslashes($params['title']);
  43  }
  44  
  45  if (isset($params['height'])) {
  46      $iframeAttributes['height'] = $params['height'];
  47  }
  48  
  49  if (isset($params['width'])) {
  50      $iframeAttributes['width'] = $params['width'];
  51  }
  52  ?>
  53  <iframe <?php echo ArrayHelper::toString($iframeAttributes); ?>></iframe>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer