Path

ez.no / documentation / ez publish / technical manual / 4.x / installation / extensions / activating the extension


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Activating the extension

This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation!

Each extension needs to be activated, which means that it is being registered for eZ Publish to be available from within the eZ Publish framework. Every extension can either be activated in the eZ Publish administration interface or in a configuration file. Furthermore, the activation can be done either for the whole eZ Publish installation or for only certain siteaccesses.

Administration interface

Log in to your eZ Publish administration interface, click on the "Setup" tab, and then click "Extensions" on the left. You will see the list of available extensions with checkboxes. To activate the sample extension, select "ezfoo" as shown in the screenshot below and click the "Apply changes" button.

Extension configuration

Screenshot of the extension configuration in the administration interface.

This will activate the extension for all siteaccesses of your eZ Publish installation.

Configuration file

Alternatively, an extension can be enabled manually in the site.ini configuration file.

Activating for the whole installation

To enable the sample extension for all of your siteaccesses, edit the "site.ini.append.php" file located in the "settings/override" directory of your eZ Publish installation. Add the following line under the "[ExtensionSettings]" configuration block:

ActiveExtensions[]=ezfoo

Multiple extensions can be present within the "[ExtensionSettings]" block. You'll have to manually create the file and/or the section if they do not exist.

Activating for a certain siteaccesses

To enable the sample extension for only a single siteaccess called "example", edit the "site.ini.append.php" file located in the "settings/siteaccess/example" directory of your eZ Publish installation. Add the following line under the "[ExtensionSettings]" configuration block:

ActiveAccessExtensions[]=ezfoo

Note that the line registering the extension is not called "ActiveExtensions", but "ActiveAccessExtensions". You'll have to manually create the file and/or the section if they do not exist.

Updating the autoload arrays

After updating the configuration file(s), you need to run the "ezpgenerateautoloads.php" script, in order to add the information about all PHP class definitions of this extension to the "autoload/ezp_extension.php" file, otherwise eZ Publish might not be able to execute the PHP code of the newly added extension. The following example shows how to run the script.

  1. Navigate into the eZ Publish directory.
  2. Run the script using the following shell command:
    bin/php/ezpgenerateautoloads.php --extension
    

The script will look for class definitions in the "extensions" directory and update the "autoload/ezp_extension.php" file accordingly.

Sandro Groganz (06/05/2005 10:11 am)

Ricardo Correia (17/04/2013 10:00 am)

Svitlana Shatokhina, Ricardo Correia


Comments

There are no comments.