[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/templates/atum/ -> error_full.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  Templates.Atum
   6   * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   8   * @since       4.0.0
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  use Joomla\CMS\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Uri\Uri;
  18  
  19  /** @var \Joomla\CMS\Document\ErrorDocument $this */
  20  
  21  $app   = Factory::getApplication();
  22  $input = $app->input;
  23  $wa    = $this->getWebAssetManager();
  24  
  25  // Detecting Active Variables
  26  $option     = $input->get('option', '');
  27  $view       = $input->get('view', '');
  28  $layout     = $input->get('layout', 'default');
  29  $task       = $input->get('task', 'display');
  30  $cpanel     = $option === 'com_cpanel';
  31  $hiddenMenu = $app->input->get('hidemainmenu');
  32  
  33  // Browsers support SVG favicons
  34  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
  35  $this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
  36  $this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
  37  
  38  // Template params
  39  $logoBrandLarge  = $this->params->get('logoBrandLarge')
  40      ? Uri::root() . htmlspecialchars($this->params->get('logoBrandLarge'), ENT_QUOTES)
  41      : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-large.svg';
  42  $logoBrandSmall = $this->params->get('logoBrandSmall')
  43      ? Uri::root() . htmlspecialchars($this->params->get('logoBrandSmall'), ENT_QUOTES)
  44      : Uri::root() . 'media/templates/administrator/atum/images/logos/brand-small.svg';
  45  
  46  $logoBrandLargeAlt = empty($this->params->get('logoBrandLargeAlt')) && empty($this->params->get('emptyLogoBrandLargeAlt'))
  47      ? 'alt=""'
  48      : 'alt="' . htmlspecialchars($this->params->get('logoBrandLargeAlt'), ENT_COMPAT, 'UTF-8') . '"';
  49  $logoBrandSmallAlt = empty($this->params->get('logoBrandSmallAlt')) && empty($this->params->get('emptyLogoBrandSmallAlt'))
  50      ? 'alt=""'
  51      : 'alt="' . htmlspecialchars($this->params->get('logoBrandSmallAlt'), ENT_COMPAT, 'UTF-8') . '"';
  52  
  53      // Get the hue value
  54      preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches);
  55  
  56      // Enable assets
  57      $wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
  58          ->useStyle('template.active.language')
  59          ->useStyle('template.user')
  60          ->addInlineStyle(':root {
  61              --hue: ' . $matches[1] . ';
  62              --template-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . ';
  63              --template-text-dark: ' . $this->params->get('text-dark', '#495057') . ';
  64              --template-text-light: ' . $this->params->get('text-light', '#ffffff') . ';
  65              --template-link-color: ' . $this->params->get('link-color', '#2a69b8') . ';
  66              --template-special-color: ' . $this->params->get('special-color', '#001B4C') . ';
  67          }');
  68  
  69  // Override 'template.active' asset to set correct ltr/rtl dependency
  70      $wa->registerStyle('template.active', '', [], [], ['template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
  71  
  72  // Set some meta data
  73      $this->setMetaData('viewport', 'width=device-width, initial-scale=1');
  74  
  75      $monochrome = (bool) $this->params->get('monochrome');
  76  
  77  // @see administrator/templates/atum/html/layouts/status.php
  78      $statusModules = LayoutHelper::render('status', ['modules' => 'status']);
  79      ?>
  80  <!DOCTYPE html>
  81  <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
  82  <head>
  83      <jdoc:include type="metas" />
  84      <jdoc:include type="styles" />
  85      <jdoc:include type="scripts" />
  86  </head>
  87  
  88  <body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome ? ' monochrome' : ''); ?>">
  89  
  90      <noscript>
  91          <div class="alert alert-danger" role="alert">
  92              <?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
  93          </div>
  94      </noscript>
  95  
  96      <header id="header" class="header d-flex">
  97          <div class="header-title d-flex">
  98              <div class="d-flex align-items-center">
  99                  <div class="logo">
 100                      <img src="<?php echo $logoBrandLarge; ?>" <?php echo $logoBrandLargeAlt; ?>>
 101                      <img class="logo-collapsed" src="<?php echo $logoBrandSmall; ?>" <?php echo $logoBrandSmallAlt; ?>>
 102                  </div>
 103              </div>
 104              <jdoc:include type="modules" name="title" />
 105          </div>
 106          <?php echo $statusModules; ?>
 107      </header>
 108  
 109      <div id="wrapper" class="d-flex wrapper<?php echo $hiddenMenu ? '0' : ''; ?>">
 110          <div class="container-fluid container-main">
 111              <?php if (!$cpanel) : ?>
 112                  <a class="btn btn-subhead d-md-none d-lg-none d-xl-none" data-bs-toggle="collapse"
 113                     data-bs-target=".subhead-collapse"><?php echo Text::_('TPL_ATUM_TOOLBAR'); ?>
 114                      <span class="icon-wrench"></span></a>
 115                  <div id="subhead" class="subhead mb-3">
 116                      <div id="container-collapse" class="container-collapse"></div>
 117                      <div class="row">
 118                          <div class="col-md-12">
 119                              <jdoc:include type="modules" name="toolbar" style="none" />
 120                          </div>
 121                      </div>
 122                  </div>
 123              <?php endif; ?>
 124              <section id="content" class="content">
 125                  <jdoc:include type="message" />
 126                  <jdoc:include type="modules" name="top" style="html5" />
 127                  <div class="row">
 128                      <div class="col-md-12">
 129                          <h1><?php echo Text::_('JERROR_AN_ERROR_HAS_OCCURRED'); ?></h1>
 130                          <blockquote class="blockquote">
 131                              <span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span>
 132                              <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
 133                          </blockquote>
 134                          <?php if ($this->debug) : ?>
 135                              <div>
 136                                  <?php echo $this->renderBacktrace(); ?>
 137                                  <?php // Check if there are more Exceptions and render their data as well ?>
 138                                  <?php if ($this->error->getPrevious()) : ?>
 139                                      <?php $loop = true; ?>
 140                                      <?php // Reference $this->_error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?>
 141                                      <?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
 142                                      <?php $this->setError($this->_error->getPrevious()); ?>
 143                                      <?php while ($loop === true) : ?>
 144                                          <p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
 145                                          <p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
 146                                          <?php echo $this->renderBacktrace(); ?>
 147                                          <?php $loop = $this->setError($this->_error->getPrevious()); ?>
 148                                      <?php endwhile; ?>
 149                                      <?php // Reset the main error object to the base error ?>
 150                                      <?php $this->setError($this->error); ?>
 151                                  <?php endif; ?>
 152                              </div>
 153                          <?php endif; ?>
 154                          <p>
 155                              <a href="<?php echo $this->baseurl; ?>" class="btn btn-secondary">
 156                                  <span class="icon-dashboard" aria-hidden="true"></span>
 157                                  <?php echo Text::_('JGLOBAL_TPL_CPANEL_LINK_TEXT'); ?></a>
 158                          </p>
 159                      </div>
 160  
 161                      <?php if ($this->countModules('bottom')) : ?>
 162                          <jdoc:include type="modules" name="bottom" style="html5" />
 163                      <?php endif; ?>
 164                  </div>
 165              </section>
 166          </div>
 167  
 168          <?php if (!$hiddenMenu) : ?>
 169              <button class="navbar-toggler toggler-burger collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-wrapper" aria-controls="sidebar-wrapper" aria-expanded="false" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
 170                  <span class="navbar-toggler-icon"></span>
 171              </button>
 172  
 173              <div id="sidebar-wrapper" class="sidebar-wrapper sidebar-menu" <?php echo $hiddenMenu ? 'data-hidden="' . $hiddenMenu . '"' : ''; ?>>
 174                  <div id="sidebarmenu">
 175                      <div class="sidebar-toggle item item-level-1">
 176                          <a id="menu-collapse" href="#" aria-label="<?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?>">
 177                              <span id="menu-collapse-icon" class="icon-toggle-off icon-fw" aria-hidden="true"></span>
 178                              <span class="sidebar-item-title"><?php echo Text::_('JTOGGLE_SIDEBAR_MENU'); ?></span>
 179                          </a>
 180                      </div>
 181                      <jdoc:include type="modules" name="menu" style="none" />
 182                  </div>
 183              </div>
 184          <?php endif; ?>
 185      </div>
 186      <jdoc:include type="modules" name="debug" style="none" />
 187  </body>
 188  </html>


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