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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 19:44:13
Script start
Timing: Jan 30 2025 19:44:13
Module start 'layout'
Timing: Jan 30 2025 19:44:13
Module start 'content'
Timing: Jan 30 2025 19:44:13
Module end 'content'
Timing: Jan 30 2025 19:44:13
Script end

Main resources:

Total runtime0.0216 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.2813151.2266
Module start 'layout' 0.00480.0034 739.5078220.7266
Module start 'content' 0.00810.0119 960.2344997.8516
Module end 'content' 0.02010.0014 1,958.085929.9766
Script end 0.0215  1,988.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.0125140.0002
Check MTime0.00114.8984140.0001
Mysql Total
Database connection0.00093.972210.0009
Mysqli_queries0.00209.155730.0007
Looping result0.00000.050810.0000
Template Total0.00104.710.0010
Template load0.00083.685910.0008
Template processing0.00021.015710.0002
Override
Cache load0.00052.387310.0005
General
dbfile0.00115.217880.0001
String conversion0.00000.026540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs