Package types
This page is for administrators and developers who need to know what kind of package they hold. It answers: which types exist, where the type is written, which types the package server offers, and what the type changes.
Contents
- Where the type is declared
- The types at a glance
- The types in the 6.0.15 index
- TypeList and what it is used for
- What the type changes
- Type, install type and install items are three things
- Related pages
Where the type is declared
In two places, which must agree:
<!-- package.xml -->
<type value="site" /><!-- index.xml on the package server -->
<package name="sevenx_multisite" version="6.0-15-stable" type="site" ... />The kernel reads the value of <type> trimmed (eZPackage::parseDOMTree()), and refuses the definition when the
value is not a plain token of letters, digits and ._+-. The setup wizard reads the type attribute of the index to
decide which remote packages are site packages (eZStepSiteTypes::retrieveRemotePackagesList()).
The types at a glance
| Type | Holds | Made by | Typical install items | Examples |
|---|---|---|---|---|
site | A starter site: requirements and install scripts | by hand, in a source repository | none (install_type="import") | sevenx_multisite, cjw_multisite, plain_site |
sitestyle | A color scheme or design: CSS, images, thumbnail | the site style wizard (ezstyle creator) | ezfile | sevenx_design_blue, ezflow_design |
contentclass | Content class definitions | the content class wizard (ezcontentclass creator) | ezcontentclass | sevenx_classes, ezwebin_classes |
contentobject | Content, often with the classes it needs | the content object wizard, ezpm add ... ezcontentobject | ezcontentobject, sometimes ezcontentclass | sevenx_multisite_democontent, sevenx_banners |
extension | One or more extensions as files | the extension export wizard (ezextension creator) | ezextension | sevenx_extension, ezstarrating_extension |
The creators and their package types are in kernel/classes/packagecreators/*/ (packageType()), listed in
settings/package.ini [CreationSettings] HandlerList[]: ezcontentobject, ezcontentclass, ezextension,
ezstyle.
Note
There is no package type design. Design files travel in sitestyle packages, or inside an extension. The word
design does appear in package.xml, but as the type of a <file-list> (files that go below
design/<design>/), not as a package type.
The types in the 6.0.15 index
The 44 entries of https://exponential.packages.exponential.earth/exponential/6.0/6.0.15/index.xml, counted by
their type attribute:
| Type | Entries |
|---|---|
site | 12 |
contentobject | 13 |
extension | 8 |
sitestyle | 7 |
contentclass | 4 |
The index groups the non-site packages under the comment DEPENDENCY PACKAGE LIST: they are offered only as
requirements of a site package, never as a choice of their own. The complete list is in
What is on the package server.
TypeList and what it is used for
[PackageSettings]
TypeList[]
TypeList[contentobject]=Content object
TypeList[contentclass]=Content class
TypeList[sitestyle]=Site style
TypeList[site]=Site
TypeList[extension]=ExtensioneZPackage::typeList() turns this into the list of types with their names. Its main use is the Type
limitation of the package policies: kernel/package/module.php gives the functions read, list, create,
edit, remove, install, import and export a limitation Type whose values come from typeList(). A user
whose policy is limited by Type may use a package only when its type is among the chosen values
(eZPackage::canUsePackagePolicyFunction()).
Note
extension is in TypeList from 6.0.15 on. Before, it was missing, so a Type limitation could not name it and a
role limited by Type never reached packages of type extension. On an older release, add it in
settings/override/package.ini.append.php:
[PackageSettings]
TypeList[extension]=ExtensionWhat the type changes
| Where | What the type does |
|---|---|
| Setup wizard, Site types step | Only site packages are offered, local (fetchPackages() with 'type' => 'site') and remote (type="site" in the index) |
| Create sites step | Nothing: it installs what the site package requires, whatever their types |
| Package policies | The Type limitation (above) |
| Package list in the administration | Shown on each card; the list can be filtered by type in eZPackage::fetchPackages() |
| Install | Nothing: install() looks at install_type and the install items, never at the type |
Type, install type and install items are three things
| Says | Example | |
|---|---|---|
<type value> | What the package is | sitestyle |
install_type | Whether install() runs the items at all | import |
<install><item type> | Which handler does the work for one item | ezfile |
A sitestyle package of 7x is type sitestyle, install type import, with one ezfile item: it is imported so
the site package's installer can use its files, and installing it on its own changes nothing. See
Import versus install and Install items and handlers.
Related pages
- Site package basics
- Site packages: start here
- What a site installer package is
- Site style package: the
sitestyletype from a designer's view - Permissions for packages
- Packages guide, 10. Permissions
- Contribute your site package
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.