Friday 04 June 2010 8:09:02 am
You should now be quite comfortable with creating objects in eZ Publish and it should hopefully be simple enough to extend the basic script you have for your specific purpose. The code can be used wherever you need it. In particular, I would suggest it’s use in implementing cronjobs to automate external content import (please also be aware of the built in RSS feed import under the settings tab for simple RSS importing) and also using it in extensions for bulk producing objects (for instance I have previously sed a similar script to import a galleries worth of images at a time into the system).
The fromstring and createAndPublish methods have made importing data into eZ Publish very straightforward. If you found this useful I would also suggest checking out the update method which exists in the eZContentFunctions class (The file location in eZ Publish is: kernel/classes/ezcontentfunctions.php).
This tutorial is available for offline reading in PDF format :
David Linnard - Creating eZ Publish Objects in PHP - PDF version
David is a London based web developer with a wide variety of skills who has spent the last two years on commercial eZ Publish web builds. He is also experienced at handling a variety of other content management systems and the Zend Framework.
Available under the Creative Commons Attribution Non-Commercial License