Packages

    All packages reside in the directory, sorted in subdirectories according to their vendor.

    Every package belongs to a specific vendor – for example pagekit for all official packages, including the Blog extension and the One theme.

    The vendor name is a unique representation of a developer or organization. In the simplest case, it just matches a GitHub username. The package name will also define the name of the directory it is stored in.

    A package contains at least two files.

    • The contains the metadata for your package and therefore acts as the package definition.

    For a theme, this file can look as follows.

    For more details on this file see the .

    A package can be either enabled, disabled or not installed. When changing the state, you might need to modify your database schema or run other custom code.

    Pagekit offers installation hooks through a custom script file. This file needs to be defined in your Package definition, the file.

    The install hook is executed after a package was installed.

    The uninstall hook is executed before a package was uninstalled.

    Pagekit will not modify the tables you have created, even when your extension is disabled or uninstalled in the admin panel. You will have to take care of needed database changes yourself.

    The enable hook is executed after a package was enabled.

    Upon enabling a package, Pagekit checks if newer update hooks than the current version are available. If so, they are executed sequentially.