$when = $event->when[0]; $reminder = $gc->newReminder(); // Set the event to M-1 $reminder->setMinutes( 1 ); $reminder->setMethod( $method ); $when->reminders = array( $reminder );
By the way, I tried to add more than one event by creating some reminders with newReminder() and declaring them this way : $when->reminders = array( $reminder, $reminder2, $reminder3 ); But it's not working, no reminder are sets if i try to add more than one. On 6 mai, 22:15, Ulex <[email protected]> wrote: > This fix does not work for me. Does it work for someone? > Is there any other solution? > > On 29 Квіт by uk_VT_linguist, 20:54, misiekg <[email protected]> > wrote: > > > I tried to do this today, and the way posted above is not good. > > > How it is working: > > > $when->setReminders(array($reminder)); > > > instead of: > > $when->reminder=array($reminder) ; > > > This way its fully ok. I spent few hours on it and I suggest to > > replace it on google page to safe another users time. > > > On 24 Mar, 08:20, brian <[email protected]> wrote: > > > > I'm no expert but I think your problem might be .. > > > > $when->reminder=array($reminder) > > > > has to look like > > > > $when[0]->reminder=array($reminder) > > > > hope it works for you, > > > brian. > > > > On Mar 18, 10:22 am, ogierepier <[email protected]> wrote: > > > > > Hi, > > > > I am trying to set a reminder to an event in my calendar. I followed > > > > the examples the developers guide gives. Yet I get an error that the > > > > function getEvent is undefined. So we loaded the class that contains > > > > the getEvent function Zend_Gdata_, we got no error but the reminder > > > > still isn't added. Here's the example: > > > > > functionsetReminder($client, $eventId, $minutes=15) > > > > { > > > > $gc = new Zend_Gdata_Calendar($client); > > > > $method = "alert"; > > > > if ($event = getEvent($client, $eventId)) { > > > > $times = $event->when; > > > > foreach ($times as $when) { > > > > $reminder = $gc->newReminder(); > > > > $reminder->setMinutes($minutes); > > > > $reminder->setMethod($method); > > > > $when->reminder = array($reminder); > > > > } > > > > $eventNew = $event->save(); > > > > return $eventNew; > > > > } else { > > > > return null; > > > > } > > > > > } > > > > > Is this a common problem? > > > > And can you help us? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
