- $notice = $happening->getNotice();
-
- if (empty($notice)) {
- // TRANS: Exception thrown when referring to a notice that is not an event an in event context.
- throw new Exception(_m('Unknown event notice.'));
- }
-
- $obj = new ActivityObject();
-
- $obj->id = $happening->uri;
- $obj->type = Happening::OBJECT_TYPE;
- $obj->title = $happening->title;
- $obj->summary = $happening->description;
- $obj->link = $notice->getUrl();
-
- // XXX: how to get this stuff into JSON?!
-
- $obj->extra[] = array('dtstart',
- array('xmlns' => 'urn:ietf:params:xml:ns:xcal'),
- common_date_iso8601($happening->start_time));
-
- $obj->extra[] = array('dtend',
- array('xmlns' => 'urn:ietf:params:xml:ns:xcal'),
- common_date_iso8601($happening->end_time));
-
- $obj->extra[] = array('location', false, $happening->location);
- $obj->extra[] = array('url', false, $happening->url);
-
- // XXX: probably need other stuff here
-