00001 <?php
00002
00021
00022
00023
00024 define('SCHED_CONF_DATE_YEAR_OFFSET_FUTURE', '+2');
00025
00026 define('REVIEW_MODE_ABSTRACTS_ALONE', 0x00000000);
00027 define('REVIEW_MODE_PRESENTATIONS_ALONE', 0x00000001);
00028 define('REVIEW_MODE_BOTH_SIMULTANEOUS', 0x00000002);
00029 define('REVIEW_MODE_BOTH_SEQUENTIAL', 0x00000003);
00030
00031 define('REVIEW_DEADLINE_TYPE_RELATIVE', 0x00000001);
00032 define('REVIEW_DEADLINE_TYPE_ABSOLUTE', 0x00000002);
00033
00034 define('SCHEDULE_LAYOUT_COMPACT', 0x00001);
00035 define('SCHEDULE_LAYOUT_EXPANDED', 0x00002);
00036
00037 class SchedConf extends DataObject {
00038
00039
00040
00041
00042
00043
00048 function getUrl() {
00049
00050
00051
00052 return Request::url(null, $this->getPath());
00053 }
00054
00059 function &getConference() {
00060 $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
00061 $returner =& $conferenceDao->getConference($this->getConferenceId());
00062 return $returner;
00063 }
00064
00069 function getCurrent() {
00070 return $this->getData('current');
00071 }
00072
00077 function setCurrent($current) {
00078 return $this->setData('current', $current);
00079 }
00080
00085 function getLocalizedTitle() {
00086 return $this->getLocalizedSetting('title');
00087 }
00088
00089 function getSchedConfTitle() {
00090 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00091 return $this->getLocalizedTitle();
00092 }
00093
00099 function getTitle($locale) {
00100 return $this->getSetting('title', $locale);
00101 }
00102
00107 function getLocalizedAcronym() {
00108 return $this->getLocalizedSetting('acronym');
00109 }
00110
00111 function getSchedConfAcronym() {
00112 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00113 return $this->getLocalizedAcronym();
00114 }
00115
00121 function getAcronym($locale) {
00122 return $this->getSetting('acronym', $locale);
00123 }
00124
00129 function getSchedConfId() {
00130 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00131 return $this->getId();
00132 }
00133
00138 function setSchedConfId($schedConfId) {
00139 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00140 return $this->setId($schedConfId);
00141 }
00142
00147 function getConferenceId() {
00148 return $this->getData('conferenceId');
00149 }
00150
00155 function setConferenceId($conferenceId) {
00156 return $this->setData('conferenceId', $conferenceId);
00157 }
00158
00163 function getPath() {
00164 return $this->getData('path');
00165 }
00166
00171 function setPath($path) {
00172 return $this->setData('path', $path);
00173 }
00174
00179 function getSequence() {
00180 return $this->getData('sequence');
00181 }
00182
00187 function setSequence($sequence) {
00188 return $this->setData('sequence', $sequence);
00189 }
00190
00191
00192
00193
00194
00199 function getStartDate() {
00200 return $this->getData('startDate');
00201 }
00202
00207 function setStartDate($startDate) {
00208 return $this->setData('startDate', $startDate);
00209 }
00210
00215 function getEndDate() {
00216 return $this->getData('endDate');
00217 }
00218
00223 function setEndDate($endDate) {
00224 return $this->setData('endDate', $endDate);
00225 }
00226
00231 function getSchedConfIntroduction() {
00232 return $this->getLocalizedSetting('introduction');
00233 }
00234
00235
00236
00237
00238
00239
00245 function getFullTitle() {
00246 return $this->getSchedConfTitle();
00247 }
00248
00249
00250
00251
00252
00253
00254
00259 function getSettings() {
00260 $schedConfSettingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
00261 return $schedConfSettingsDao->getSchedConfSettings($this->getId());
00262 }
00263
00269 function &getLocalizedSetting($name) {
00270 $returner = $this->getSetting($name, AppLocale::getLocale());
00271 if ($returner === null) {
00272 unset($returner);
00273 $returner = $this->getSetting($name, AppLocale::getPrimaryLocale());
00274 }
00275 return $returner;
00276 }
00277
00284 function &getSetting($name, $locale = null) {
00285 $schedConfSettingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
00286 $setting =& $schedConfSettingsDao->getSetting($this->getId(), $name, $locale);
00287 return $setting;
00288 }
00289
00297 function updateSetting($name, $value, $type = null, $isLocalized = false) {
00298 $schedConfSettingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
00299 return $schedConfSettingsDao->updateSetting($this->getSchedConfId(), $name, $value, $type, $isLocalized);
00300 }
00301
00306 function getPrimaryLocale() {
00307 $conference =& $this->getConference();
00308 return $conference->getPrimaryLocale();
00309 }
00310
00315 function setPrimaryLocale($primaryLocale) {
00316 return $this->setData('primaryLocale', $primaryLocale);
00317 }
00318
00323 function getStyleFilename() {
00324 return $this->getSetting('schedConfStyleSheet');
00325 }
00326 }
00327
00328 ?>