Table des matières
- Présentation et installation des extensions
- Ordre de chargement des extensions
- Extraction des fichiers
- Activer les extensions
Activating the extension -- Activer les extensions
Date de publication: le lundi 28 novembre 2011 à 10h24
Dernière modification: par Pascal BOYER le lundi 28 novembre 2011 à 15h44
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 site accesses.
Chaque extension doit être activée, ce qui signifie qu'elle est enregistrée pour eZ Publish afin d'être disponible depuis le framework eZ Publish. Toute extension peut être activée soit depuis l'interface d'administration soit en éditant un fichier de configuration. Par ailleurs, l'activation peut concerner soit l'ensemble de l'installation eZ Publish soit uniquement certains siteaccess.
Note: As of the 4.4 release of eZ Publish we have implemented a feature for automatic loading of extensions in the required sequence. Please go to Extension load ordering for more information on how to do this. If you are running on releases prior to 4.4, please continue reading below.
Note: Depuis sa version 4.4, eZ Publish implémente une fonction de chargement automatique des extensions en respectant l'ordre requis. Veuillez vous reporter à la page
Ordre de chargement des extensions
pour de plus amples information sur ce processus. Si vous utilisez une version antérieure à la version 4.4, poursuivez alors votre lecture ci-dessous.
Administration interface / Interface d’administration
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 check-boxes. Simply select the ones you need as shown in the screenshot below and click the "Apply changes" button.
Connectez-vous à l'interface d'administration d'eZ Publish puis cliquez sur l'onglet Administration et enfin sur le lien Extensions dans le menu de gauche. La liste des extensions disponibles s'affichera accompagnées de cases à cocher. Sélectionnez simplement les extensions dont vous avez besoin comme indiqué par la capture d'écran ci-dessous puis cliquez sur le bouton Activate.
This will activate the extension for all siteaccesses of your eZ Publish installation.
Ceci aura pour effet d'activer l'extension pour l'ensemble des siteaccess de votre installation eZ Publish.
Configuration file / Fichier de configuration
Alternatively, an extension can be enabled manually in the site.ini configuration file.
L'autre méthode d'activation des extensions consiste à la réaliser manuellement dans le fichier site.ini.
Activating for the whole installation / Activation pour l'installation complète
To enable the sample extension for all of your site accesses, 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:
Pour activer l'extension pour l'ensemble des siteaccess de votre site vous devez éditer le fichier settings/override/site.ini.append.php de votre installation eZ Publish et y ajouter les lignes suivantes sous la section [ExtensionSettings]:
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.
Plusieurs extensions peuvent être mentionnées par la section [ExtensionSettings]. Vous devrez créer manuellement le fichier et/ou la section s'ils n'existent pas déjà.
Activating for certain siteaccesses / Activation pour quelques siteaccess
To enable the sample extension for only a single site access 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:
Pour n'activer l'extension que pour le siteaccess nommé example vous devez éditer le fichier settings/sitesccess/example/site.ini.append.php de votre installation eZ Publish et y ajouter les lignes suivantes sous la section [ExtensionSettings]:
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.
Notez que le paramètre qui enregistre l'extension n'est pas ActiveExtensions mais ActiveAccessExtensions. Vous devrez créer manuellement le fichier et/ou la section s'ils n'existent pas déjà.
Updating the autoload arrays / Mettre à jour les tableaux d'autochargement
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.
Après avoir mis à jour le(s) fichier(s) de configuration, vous devez exécuter le script ezpgenerateautoloads.php afin d'ajouter au fichier autoload/ezp_extension.php les informations sur les définitions des classes PHP de l'extension. Sans cela, eZ Publish ne sera pas en mesure d'exécuter le code PHP de cette nouvelle extension. Ce qui suit explique comment exécuter le script:
-
Navigate into the eZ Publish directory.
Placez-vous à la racine du répertoire d'installation d'eZ Publish Run the script using the following shell command:
Exécutez le script grâce à la commande suivantebin/php/ezpgenerateautoloads.php --extension
The script will look for class definitions in the "extensions" directory and update the "autoload/ezp_extension.php" file accordingly.
Ce script recherchera les définitions de classes dans les répertoires des extensions et mettra à jour le fichier autoload/ezp_extension.php en conséquence.
Commentaires














