This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » best way to add class attributes...
expandshrink

best way to add class attributes programatically?

best way to add class attributes programatically?

Tuesday 17 September 2013 4:58:15 pm - 1 reply

What's the best way to add an attribute to a class via PHP?

I'm looking for something that does the whole process, both adding content class attribute to the class, and updating corresponding objects by adding the content object attribute to them.

It seems like theĀ eZSiteInstaller class has the method that does it, but is that the right way to do it?

Tuesday 17 September 2013 5:21:18 pm

We added this functionality to our Mugo Queue extension based on ezxmlinstaller.

For some inspiration, you can see this code:

https://github.com/mugoweb/mugo_queue/blob/master/classes/tasks/MugoAddAttribute.php

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from