eZ Community » Forums » Developer » override Datatype Classes

override Datatype Classes

override Datatype Classes

Thursday 13 November 2014 11:03:43 am - 1 reply

i was just flowing this article http://www.ezpedia.org/solution/overriding_kernel_classes_within_an_extension because i  wanted to override the  eztexttype class but there's no effect it work  with the official kernel class not  with mine i  was trying to find the problem but i cant figure it out can you please explain to me  why it keep  working with the kernel version and not with the override  one


Thursday 13 November 2014 12:17:55 pm

Hello safa,

It sounds like the kernel datatype class(es) are not correctly being overriden.

This can happen for a number of reasons.

  • Have your renamed config.php-RECOMMENDED to config.php?
  • Have you cleared all caches?
  • Have you regenerated autoloads correctly (this is prolly where your problem lies). 
    • Try running this command first: ./bin/php/ezpgenerateautoloads.php with no parameters.
    • Then try running this command with the -o parameter: ./bin/php/ezpgenerateautoloads.php -o
    • Then try running this command with the -e parameter: ./bin/php/ezpgenerateautoloads.php -k

But to be honest, I would create a custom separate datatype extension instead of trying to override.

It's just about the same amount of work but with better outcomes and easier long term maintenance.

I hope this helps!



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

36 542 Users on board!

Forums menu

Proudly Developed with from