eZ Community » Forums » Extensions » Custom Fetch in a custom Extension

Custom Fetch in a custom Extension

Custom Fetch in a custom Extension

Wednesday 11 June 2008 5:46:14 pm - 6 replies


i followed the jacextension tutorial (http://ez.no/developer/articles/a..._extensions/template_fetch_function)
and the template operator works fine but not the template fetch function.
In the debug, i found out that eZ can't find the class "eZModul1FunctionCollection", so i was wondering if this solution with function_definition.php and ezmodul1functioncollection.php is not deprecated ?

Thursday 12 June 2008 5:26:08 am

You may wish to try move the file "../jacextension\modules\modul1\ezmodul1functioncollection.php" to the directory "..\jacextension\classes".

Thursday 12 June 2008 10:31:56 am


fine that you read my tutorial happy.gif Emoticon.

What ez version do you use.
The tutorial was written for ez 3.x and in ez 4 it is possible that you have to change some things.

if you use ez4 try to use the php script

php bin/php/ezpgenerateautoloads.php -e -v

to update the ezroot/autoloads/ezp_extension.php

Thursday 12 June 2008 11:46:17 am


i upgrade the source code of the tutorial.
I got the same problem, that the class could not be found.

You must update autoloads.php to solve the problem.

I will put the complete source code for ez4 of jacextension on projects.ez.no in the next days.


Thursday 12 June 2008 12:57:00 pm

I create a new project on projects.ez.no for all stuff related to jacextension
including sourcecode for ez 3.x and ez 4.x version.


Thursday 12 June 2008 2:39:34 pm

yes it works better

Friday 04 July 2008 4:37:50 pm

First of all I would like to say Hello to whole EZ community thank you Felix for you helpfull article.

After working with some other cmss and developing a few in-house ones I've found EZ has all features (on developing, framework and conceptional level) I was thinking about but had never so many resources to support it at once. Now I know I would never to it with team of max 3 developers - anyway big respect to architecture designers of EZ.

Ok, now regarding to the article and exacly the problem mentioned above

I am using E 4.0 (ezcomponents installed as well). I have no access to ssh, php's 'system' methods are blocked (it is not possible to call php bin/php/ezpgenerateautoloads.php -e -v ).

'Regenerate autoloads array' button doesn't resolve the issue with not found eZModul1FunctionCollection Class for list method (there is still no class eZModul1FunctionCollection generated in autoload/ezp_extension.php).

The only thing I could do was a manual update of autoload/ezp_extension.php adding there 'eZModul1FunctionCollection' => 'extension/jacextension/modules/modul1/ezmodul1functioncollection.php' what finally solved “can't find eZModul1FunctionCollection class for method list” problem.

My question is: doesn't it violence integrity and modularity tests. other words: what happened if I export this module as a black-box package and install it on another EZ installation/server - will it be required to update manually autoloads/ezp_extension.php (assume server has no ssh and blocked system method)? If the answer is 'yes' it means it is not fully independent package. I would like to keep modularity for extensions - its very important for its reuse – that why I am asking about so 'trivial' thing. After all – probably I've lost something – I am new in EZ happy.gif Emoticon

PS: I did try to move ezmodul1functioncollection.php to classes subdirectory as well.

cheers all


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from