public function getSunrise($format = 'Y-m-d H:i:s') { $sunrise = parent::getSunrise($format); if (!is_null($sunrise)) { return $sunrise; } $entry = $this->getEntry(); if (!$entry) { return null; } $sunrise = $entry->getStartDate($format); if (!is_null($sunrise)) { return $sunrise; } return $entry->getCreatedAt($format); }
public function getSunrise($format = 'Y-m-d H:i:s') { $sunrise = parent::getSunrise($format); if (!is_null($sunrise)) { return $sunrise; } $entry = entryPeer::retrieveByPKNoFilter($this->getEntryId()); if (!$entry) { return null; } $sunrise = $entry->getStartDate($format); if (!is_null($sunrise)) { return $sunrise; } return $entry->getCreatedAt($format); }