Friday 04 June 2010 5:09:02 pm
This tutorial will show you how to create eZ Publish objects using PHP to allow you to dynamically create or import content from elsewhere. After reading this article you should be able to create objects for any situation including those with XML fields, image or file fields and object relations.
eZ Publish allows you to publish nodes directly through your PHP very easily. In this tutorial I will cover how you can write a custom script to import your content into the CMS. Importing images, XML content and object relations along the way. The code be easily adapted to suit other purposes, whether you want to add it to your own extension to handle bulk imports, or if you want to automate content import for third party content using a cronjob.
Knowledge of object orientated PHP and the ability to run PHP scripts on the command line is required. A knowledge of the structure of the eZ Publish admin interface is required for establishing the structure of what you will be creating. Being able to access class information under setup is also needed.
Additional knowledge about eZ Content Objects is beneficial as is the structure of eZ Publish URLs.
An installed instance of at least eZ Publish 3.9 is required although I am running the scripts in eZ Publish 4.3.