[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/installer/packageinstaller/ -> packageinstaller.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Plugin
   5   * @subpackage  Installer.packageInstaller
   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   * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
  11   */
  12  
  13  use Joomla\CMS\Language\Text;
  14  use Joomla\CMS\Plugin\CMSPlugin;
  15  use Joomla\CMS\Plugin\PluginHelper;
  16  
  17  // phpcs:disable PSR1.Files.SideEffects
  18  \defined('_JEXEC') or die;
  19  // phpcs:enable PSR1.Files.SideEffects
  20  
  21  /**
  22   * PackageInstaller Plugin.
  23   *
  24   * @since  3.6.0
  25   */
  26  class PlgInstallerPackageInstaller extends CMSPlugin
  27  {
  28      /**
  29       * Application object
  30       *
  31       * @var    \Joomla\CMS\Application\CMSApplication
  32       * @since  4.0.0
  33       */
  34      protected $app;
  35  
  36      /**
  37       * Textfield or Form of the Plugin.
  38       *
  39       * @return  array  Returns an array with the tab information
  40       *
  41       * @since   3.6.0
  42       */
  43      public function onInstallerAddInstallationTab()
  44      {
  45          // Load language files
  46          $this->loadLanguage();
  47  
  48          $tab            = array();
  49          $tab['name']    = 'package';
  50          $tab['label']   = Text::_('PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_PACKAGE_FILE');
  51  
  52          // Render the input
  53          ob_start();
  54          include PluginHelper::getLayoutPath('installer', 'packageinstaller');
  55          $tab['content'] = ob_get_clean();
  56  
  57          return $tab;
  58      }
  59  }


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