[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/layouts/joomla/installer/ -> changelog.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  Layout
   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  use Joomla\CMS\Language\Text;
  12  
  13  defined('_JEXEC') or die;
  14  
  15  array_walk(
  16      $displayData,
  17      function ($items, $changeType) {
  18          // If there are no items, continue
  19          if (empty($items)) {
  20              return;
  21          }
  22  
  23          switch ($changeType) {
  24              case 'security':
  25                  $class = 'bg-danger';
  26                  break;
  27              case 'fix':
  28                  $class = 'bg-dark';
  29                  break;
  30              case 'language':
  31                  $class = 'bg-primary';
  32                  break;
  33              case 'addition':
  34                  $class = 'bg-success';
  35                  break;
  36              case 'change':
  37                  $class = 'bg-warning text-dark';
  38                  break;
  39              case 'remove':
  40                  $class = 'bg-secondary';
  41                  break;
  42              default:
  43              case 'note':
  44                  $class = 'bg-info';
  45                  break;
  46          }
  47  
  48          ?>
  49          <div class="changelog">
  50              <div class="changelog__item">
  51                  <div class="changelog__tag">
  52                      <span class="badge <?php echo $class; ?>"><?php echo Text::_('COM_INSTALLER_CHANGELOG_' . $changeType); ?></span>
  53                  </div>
  54                  <div class="changelog__list">
  55                      <ul>
  56                          <li><?php echo implode('</li><li>', $items); ?></li>
  57                      </ul>
  58                  </div>
  59              </div>
  60          </div>
  61          <?php
  62      }
  63  );


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