Forums / Developer / Modify a content class via script
Jérôme Vieilledent
Saturday 07 February 2009 6:58:40 am
Hi
Does anybody know if it is possible to (easily) modify a content class with a PHP script ?Indeed, I sometimes have to add/remove attributes in my content classes to satisfy the new needs of my clients. The problem is that I have to do this in the admin, on my dev environment, on the pre-production environment and finally on the production environment. That's annoying and it can be dangerous if you forget something...
Thanks for your help
Łukasz Serwatka
Saturday 07 February 2009 12:23:46 pm
Hi,
You can take a look on code in this contribution. It should give you some ideas how to add attributes on PHP level.
http://ez.no/developer/contribs/hacks/update_class_from_command_line
See also user comments.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog