/** * Get field type data based on eventid * * @return array */ public function getEventFieldData($id) { $event = array(); $eventRecord = Venti_EventRecord::model(); if ($record = $this->eventRecord->findByAttributes(array("eventid" => $id))) { $event = array('startDate' => $record->startDate, 'endDate' => $record->endDate, 'allDay' => (bool) $record->allDay, 'repeat' => (bool) $record->repeat, 'summary' => $record->summary, 'rRule' => $record->rRule); return $event; } }
/** * Get field type data based on eventid * * @return array */ public function getEventFieldData($id, $localeId = null) { $event = array(); $eventRecord = Venti_EventRecord::model(); if ($record = $this->eventRecord->findByAttributes(array("eventid" => $id, "locale" => $localeId))) { $event = array('startDate' => $record->startDate, 'endDate' => $record->endDate, 'allDay' => (bool) $record->allDay, 'repeat' => (bool) $record->repeat, 'summary' => $record->summary, 'rRule' => $record->rRule, 'locale' => $record->locale); return $event; } else { //craft()->userSession->setError(Craft::t("Event with id (". $id .") can't be found for event field data.")); VentiPlugin::log("Venti_EventManageService::getEventFieldData – can't find event by id " . $id . ".", LogLevel::Error, true); } }