/** * Returns our end date and time as a UNIX timestamp. * * @return int our end date and time as a UNIX timestamp or 0 if we * don't have an end date */ public function getEndDateAsTimestamp() { if (!$this->hasTimeslots()) { return parent::getEndDateAsTimestamp(); } $result = 0; $dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_seminars_timeslots.end_date AS end_date', 'tx_seminars_timeslots', 'tx_seminars_timeslots.seminar = ' . $this->getUid() . tx_oelib_db::enableFields('tx_seminars_timeslots'), '', 'tx_seminars_timeslots.begin_date DESC', '0,1'); if ($dbResult) { if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) { $result = $row['end_date']; } } return $result; }
/** * The constructor. * * @param array $configuration TS setup configuration array, may be empty */ public function __construct(array $configuration) { parent::init($configuration); }