[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_joomlaupdate 6 * 7 * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Joomlaupdate\Administrator\View\Upload; 12 13 use Joomla\CMS\Component\ComponentHelper; 14 use Joomla\CMS\Factory; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; 17 use Joomla\CMS\Toolbar\ToolbarHelper; 18 19 // phpcs:disable PSR1.Files.SideEffects 20 \defined('_JEXEC') or die; 21 // phpcs:enable PSR1.Files.SideEffects 22 23 /** 24 * Joomla! Update's Update View 25 * 26 * @since 3.6.0 27 */ 28 class HtmlView extends BaseHtmlView 29 { 30 /** 31 * An array with the Joomla! update information. 32 * 33 * @var array 34 * 35 * @since 4.0.0 36 */ 37 protected $updateInfo = null; 38 39 /** 40 * Flag if the update component itself has to be updated 41 * 42 * @var boolean True when update is available otherwise false 43 * 44 * @since 4.0.0 45 */ 46 protected $selfUpdateAvailable = false; 47 48 /** 49 * Warnings for the upload update 50 * 51 * @var array An array of warnings which could prevent the upload update 52 * 53 * @since 4.0.0 54 */ 55 protected $warnings = []; 56 57 /** 58 * Should I disable the confirmation checkbox for taking a backup before updating? 59 * 60 * @var boolean 61 * @since 4.2.0 62 */ 63 protected $noBackupCheck = false; 64 65 /** 66 * Renders the view. 67 * 68 * @param string $tpl Template name. 69 * 70 * @return void 71 * 72 * @since 3.6.0 73 */ 74 public function display($tpl = null) 75 { 76 // Load com_installer's language 77 $language = Factory::getLanguage(); 78 $language->load('com_installer', JPATH_ADMINISTRATOR, 'en-GB', false, true); 79 $language->load('com_installer', JPATH_ADMINISTRATOR, null, true); 80 81 $this->updateInfo = $this->get('UpdateInformation'); 82 $this->selfUpdateAvailable = $this->get('CheckForSelfUpdate'); 83 84 if ($this->getLayout() !== 'captive') { 85 $this->warnings = $this->get('Items', 'warnings'); 86 } 87 88 $params = ComponentHelper::getParams('com_joomlaupdate'); 89 $this->noBackupCheck = $params->get('backupcheck', 1) == 0; 90 91 $this->addToolbar(); 92 93 // Render the view. 94 parent::display($tpl); 95 } 96 97 /** 98 * Add the page title and toolbar. 99 * 100 * @return void 101 * 102 * @since 4.0.0 103 */ 104 protected function addToolbar() 105 { 106 // Set the toolbar information. 107 ToolbarHelper::title(Text::_('COM_JOOMLAUPDATE_OVERVIEW'), 'sync install'); 108 109 $arrow = Factory::getLanguage()->isRtl() ? 'arrow-right' : 'arrow-left'; 110 ToolbarHelper::link('index.php?option=com_joomlaupdate&' . ($this->getLayout() == 'captive' ? 'view=upload' : ''), 'JTOOLBAR_BACK', $arrow); 111 ToolbarHelper::divider(); 112 ToolbarHelper::help('Joomla_Update'); 113 } 114 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |