00001 <?php
00002
00016 class Series extends DataObject {
00020 function Series() {
00021 parent::DataObject();
00022 }
00023
00028 function getPressId() {
00029 return $this->getData('pressId');
00030 }
00031
00036 function setPressId($pressId) {
00037 return $this->setData('pressId', $pressId);
00038 }
00039
00044 function getPath() {
00045 return $this->getData('path');
00046 }
00047
00052 function setPath($path) {
00053 return $this->setData('path', $path);
00054 }
00055
00060 function getLocalizedTitle() {
00061 return $this->getLocalizedData('title');
00062 }
00063
00068 function getLocalizedFullTitle() {
00069 $fullTitle = null;
00070 if ($prefix = $this->getLocalizedPrefix()) {
00071 $fullTitle = $prefix . ' ';
00072 }
00073
00074 $fullTitle .= $this->getLocalizedTitle();
00075
00076 if ($subtitle = $this->getLocalizedSubtitle()) {
00077 $fullTitle = String::concatTitleFields(array($fullTitle, $subtitle));
00078 }
00079
00080 return $fullTitle;
00081 }
00082
00088 function getTitle($locale) {
00089 return $this->getData('title', $locale);
00090 }
00091
00097 function setTitle($title, $locale) {
00098 return $this->setData('title', $title, $locale);
00099 }
00100
00105 function getLocalizedPrefix() {
00106 return $this->getLocalizedData('prefix');
00107 }
00108
00114 function getPrefix($locale) {
00115 return $this->getData('prefix', $locale);
00116 }
00117
00123 function setPrefix($prefix, $locale) {
00124 return $this->setData('prefix', $prefix, $locale);
00125 }
00126
00131 function getLocalizedSubtitle() {
00132 return $this->getLocalizedData('subtitle');
00133 }
00134
00140 function getSubtitle($locale) {
00141 return $this->getData('subtitle', $locale);
00142 }
00143
00149 function setSubtitle($subtitle, $locale) {
00150 return $this->setData('subtitle', $subtitle, $locale);
00151 }
00152
00157 function getLocalizedDescription() {
00158 return $this->getLocalizedData('description');
00159 }
00160
00165 function getDescription($locale) {
00166 return $this->getData('description', $locale);
00167 }
00168
00173 function setDescription($description, $locale) {
00174 $this->setData('description', $description, $locale);
00175 }
00176
00181 function getFeatured() {
00182 return $this->getData('featured');
00183 }
00184
00189 function setFeatured($featured) {
00190 $this->setData('featured', $featured);
00191 }
00192
00197 function getImage() {
00198 return $this->getData('image');
00199 }
00200
00205 function setImage($image) {
00206 return $this->setData('image', $image);
00207 }
00208
00214 function getEditorsString() {
00215 $seriesEditorsDao =& DAORegistry::getDAO('SeriesEditorsDAO');
00216 $editors = $seriesEditorsDao->getEditorsBySeriesId($this->getId(), $this->getPressId());
00217
00218 $separator = ', ';
00219 $str = '';
00220
00221 foreach ($editors as $editorData) {
00222 $editor =& $editorData['user'];
00223
00224 if (!empty($str)) {
00225 $str .= $separator;
00226 }
00227
00228 $str .= $editor->getFullName();
00229 $editor = null;
00230 }
00231
00232 return $str;
00233 }
00234 }
00235
00236 ?>