Table of contents:
The best way to override kernel classes within eZ Publish.
This article features solutions for both eZ Pubish 3 and eZ Publish 4.
Please notice that the primary solution described for eZ Publish 4 is a supported but not recommended feature.
Please use with care and caution when working with the internals of the eZ Publish Kernel.
What is the best way to override default eZ Publish kernel classes?
Several solutions come to mind. The best solution in eZ Publish 4 is to override the class within an extension. Remember this should be considered kernel hacking which while allowed and even more supported than ever in eZ Publish 4 it is still causioned.
In the past the best way to do this was to simply patch the original file and replace it with a modified file within original kernel location.
This is the standard solution within eZ Publish.
See articles on creating an extension
Remember pathing is a relative scheme (pattern) which must be maintained within the extension directory root.
mkdir -p extension/customname/kernel/classes/; cp -va kernel/classes/ezcontentobjecttree.php extension/customname/kernel/classes/;
Create if file does not exist in root of ezpublish directory. Edit config.php file and enable the following setting.
EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE
./bin/php/ezpgenerateautoload.php -o
Article provided by eZpedia
All text is available under the terms of the GNU Free Documentation License
Powered by eZ Publish 6.0.2stable
Hosted by USA eZ Publish Community Partner : Brookins Consulting