Creating event with eventStatus using Zend Gdata

After searching the net for a way of setting eventStatus I noticed that quite a few people had the same problem as me. Here is the way I managed to do it.

After declaring service:
$service = new Zend_Gdata_Calendar( $client );

and creating a new entry container object:
$newEntry = $service -> newEventEntry();

You declare event status for this event to be either of these (tentative, confirmed, canceled) with this code:
$newEntry -> eventStatus = $service -> newEventStatus( $URL );

where $URL can be either of the three:

  • http://schemas.google.com/g/2005#event.tentative
  • http://schemas.google.com/g/2005#event.confirmed; or
  • http://schemas.google.com/g/2005#event.canceled

Happy coding

Leave a comment

Please be polite and on topic. Your e-mail will never be published.