[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/ -> noupdate.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_joomlaupdate
   6   *
   7   * @copyright   (C) 2021 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\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Session\Session;
  18  
  19  $uploadLink = 'index.php?option=com_joomlaupdate&view=upload';
  20  
  21  $displayData = [
  22      'textPrefix' => 'COM_JOOMLAUPDATE' . $this->messagePrefix,
  23      'content'    => Text::sprintf($this->langKey, $this->updateSourceKey),
  24      'formURL'    => 'index.php?option=com_joomlaupdate&view=joomlaupdate',
  25      'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Updating_from_an_existing_version',
  26      'icon'       => 'icon-loop joomlaupdate',
  27      'createURL'  => 'index.php?option=com_joomlaupdate&task=update.purge&' . Session::getFormToken() . '=1'
  28  ];
  29  
  30  if (Factory::getApplication()->getIdentity()->authorise('core.admin', 'com_joomlaupdate')) {
  31      $displayData['formAppend'] = '<div class="text-center"><a href="' . $uploadLink . '" class="btn btn-sm btn-outline-secondary">' . Text::_($displayData['textPrefix'] . '_EMPTYSTATE_APPEND') . '</a></div>';
  32  }
  33  
  34  if (isset($this->updateInfo['object']) && isset($this->updateInfo['object']->get('infourl')->_data)) :
  35      $displayData['content'] .= '<br>' . HTMLHelper::_(
  36          'link',
  37          $this->updateInfo['object']->get('infourl')->_data,
  38          Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INFOURL'),
  39          [
  40              'target' => '_blank',
  41              'rel'    => 'noopener noreferrer',
  42              'title'  => isset($this->updateInfo['object']->get('infourl')->title) ? Text::sprintf('JBROWSERTARGET_NEW_TITLE', $this->updateInfo['object']->get('infourl')->title) : ''
  43          ]
  44      );
  45  endif;
  46  
  47  $content = LayoutHelper::render('joomla.content.emptystate', $displayData);
  48  
  49  // Inject Joomla! version
  50  echo str_replace('%1$s', '&#x200E;' . $this->updateInfo['latest'], $content);


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