00001 <?php
00002
00020
00021
00022
00023 define('ANNOUNCEMENT_EXPIRE_YEAR_OFFSET_FUTURE', '+10');
00024
00025
00026 class Announcement extends DataObject {
00027
00028
00029
00030
00035 function getAnnouncementId() {
00036 return $this->getData('announcementId');
00037 }
00038
00043 function setAnnouncementId($announcementId) {
00044 return $this->setData('announcementId', $announcementId);
00045 }
00046
00051 function getJournalId() {
00052 return $this->getData('journalId');
00053 }
00054
00059 function setJournalId($journalId) {
00060 return $this->setData('journalId', $journalId);
00061 }
00062
00067 function getTypeId() {
00068 return $this->getData('typeId');
00069 }
00070
00075 function setTypeId($typeId) {
00076 return $this->setData('typeId', $typeId);
00077 }
00078
00083 function getAnnouncementTypeName() {
00084 $announcementTypeDao = &DAORegistry::getDAO('AnnouncementTypeDAO');
00085 return $announcementTypeDao->getAnnouncementTypeName($this->getData('typeId'));
00086 }
00087
00092 function getAnnouncementTitle() {
00093 return $this->getLocalizedData('title');
00094 }
00095
00100 function getAnnouncementTitleFull() {
00101 $typeName = $this->getAnnouncementTypeName();
00102 $title = $this->getAnnouncementTitle();
00103
00104 if (!empty($typeName)) {
00105 return $typeName . ': ' . $title;
00106 } else {
00107 return $title;
00108 }
00109 }
00110
00116 function getTitle($locale) {
00117 return $this->getData('title', $locale);
00118 }
00119
00125 function setTitle($title, $locale) {
00126 return $this->setData('title', $title, $locale);
00127 }
00128
00133 function getAnnouncementDescriptionShort() {
00134 return $this->getLocalizedData('descriptionShort');
00135 }
00136
00142 function getDescriptionShort($locale) {
00143 return $this->getData('descriptionShort', $locale);
00144 }
00145
00151 function setDescriptionShort($descriptionShort, $locale) {
00152 return $this->setData('descriptionShort', $descriptionShort, $locale);
00153 }
00154
00159 function getAnnouncementDescription() {
00160 return $this->getLocalizedData('description');
00161 }
00162
00168 function getDescription($locale) {
00169 return $this->getData('description', $locale);
00170 }
00171
00177 function setDescription($description, $locale) {
00178 return $this->setData('description', $description, $locale);
00179 }
00180
00185 function getDateExpire() {
00186 return $this->getData('dateExpire');
00187 }
00188
00193 function setDateExpire($dateExpire) {
00194 return $this->setData('dateExpire', $dateExpire);
00195 }
00196
00201 function getDatePosted() {
00202 return date('Y-m-d', strtotime($this->getData('datePosted')));
00203 }
00204
00209 function getDatetimePosted() {
00210 return $this->getData('datePosted');
00211 }
00212
00217 function setDatePosted($datePosted) {
00218 return $this->setData('datePosted', $datePosted);
00219 }
00220
00225 function setDatetimePosted($datetimePosted) {
00226 return $this->setData('datePosted', $datetimePosted);
00227 }
00228 }
00229
00230 ?>