Forums / Developer / Get calendar and corresponding events from database

Get calendar and corresponding events from database

Author Message

Ivan Švogor

Tuesday 04 January 2011 6:38:03 am

Hello, I need to access the database so I could do some tweaking of calendar. So what I need is the calendar and its events, in php code. I will than export it to ical format.

Can anyone tell me how to access this in code?

tnx

Edi Modrić

Monday 10 January 2011 7:16:52 am

Hi Ivan,

Calendar and events are just regular content objects and you can use eZ Publish PHP API to access them in your code.

Take a look at here http://pubsvn.ez.no/doxygen/4.4/html/ , specifically the documentation for eZContentObject and eZContentObjectTreeNode PHP classes.

For example, you can use eZContentObjectTreeNode::subTreeByNodeID(false, 123) static function to fetch all nodes below node with node_id = 123

eZ Publish certified developer

http://ez.no/certification/verify/350658