Joomla 4.x-Tutorial - Entwicklung von Erweiterungen - Paket - Alle Erweiterungen in einer Installationsdatei

Modify this post

We have created a lot of different extensions. It is annoying to do a separate installation for each one. This is not reasonable for a user. Moreover, some of these extensions build on each other and it is important to make sure that everything is installed and nothing has been forgotten. Therefore, in this concluding chapter I show how different extensions are packed together into one installation package.

For the impatient

Look at the changed programme code in the Diff and apply these changes to your development version.

Step by step

In this section we will create an installation package. In the following overview, the newly added files are marked with a background and the changed ones are outlined.

Overview of the files edited in this chapter

New files


administrator/manifests/ packages/foos/script.php

Like the component, a package can be extended with an optional script. In our case, we check whether the installation requirements are met in terms of minimum versions for Joomla and PHP.

administrator/manifests/ packages/foos/script.php


 * @package     Joomla.Site
 * @subpackage  pkg_foos
 * @copyright   Copyright (C) 2005 - 2019 Astrid Günther, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later;
 * @link

\defined('_JEXEC') or die;

 * Installation class to perform additional changes during install/uninstall/update
 * @since  __BUMP_VERSION__
class Pkg_FoosInstallerScript
	 * Extension script constructor.
	 * @since   __BUMP_VERSION__
	public function __construct()
		$this->minimumJoomla = '4.0';
		$this->minimumPhp    = JOOMLA_MINIMUM_PHP;
administrator/manifests/ packages/pkg_foos.xml

You already know the manifest. In the case of a package, there is little new here. In the area of the files to be copied, you specify the installation packages of the extensions that are to be installed.

administrator/manifests/ packages/pkg_foos.xml

<!-- -->
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="1.0" method="upgrade">
	<packager>Astrid Günther</packager>
	<copyright>(C) ##YEAR## Astrid Günther. All rights reserved.</copyright>
	<author>Astrid Günther</author>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
		<!-- The id for each extension is the element stored in the DB -->
		<file type="component" id="com_foos"></file>
		<file type="module" id="mod_foo" client="site"></file>
		<file type="plugin" id="plg_webservices_foos" group="webservices"></file>
		<file type="template" id="tpl_facile" client="site"></file>
		<server type="extension" name="Foo Updates"></server>
	<dlid prefix="dlid=" suffix="" />

Teste dein Joomla-Template

  1. Führe eine neue Installation durch. Deinstalliere hierzu deine bisherige Installation.
  2. Erstelle für jede Erweiterung ein ZIP-Archiv
  3. Erstelle ein ZIP Archiv das alle ZIP-Dateien und die Dateien dieses Kapitels enthält.
  4. Installiere das in Punkt 3 erstellt ZIP in Joomla.
  5. Stelle sicher, dass alle im Bereich Files angegebenen Erweiterungen installiert wurden.
Modify this post