Open Monograph Press  3.3.0
Series.inc.php
1 <?php
2 
17 import('lib.pkp.classes.context.PKPSection');
18 
19 class Series extends PKPSection {
23  function __construct() {
24  parent::__construct();
25  }
26 
31  function getPressId() {
32  return $this->getContextId();
33  }
34 
39  function setPressId($pressId) {
40  return $this->setContextId($pressId);
41  }
42 
48  function getLocalizedTitle($includePrefix = true) {
49  $title = $this->getLocalizedData('title');
50  if ($includePrefix) {
51  $title = $this->getLocalizedPrefix() . ' ' . $title;
52  }
53  return $title;
54  }
55 
62  function getTitle($locale, $includePrefix = true) {
63  $title = $this->getData('title', $locale);
64  if ($includePrefix) {
65  if (is_array($title)) {
66  foreach($title as $locale => $currentTitle) {
67  $title[$locale] = $this->getPrefix($locale) . ' ' . $currentTitle;
68  }
69  } else {
70  $title = $this->getPrefix($locale) . ' ' . $title;
71  }
72  }
73  return $title;
74  }
75 
80  function getLocalizedFullTitle() {
81  $fullTitle = $this->getLocalizedTitle();
82 
83  if ($subtitle = $this->getLocalizedSubtitle()) {
84  $fullTitle = PKPString::concatTitleFields(array($fullTitle, $subtitle));
85  }
86 
87  return $fullTitle;
88  }
89 
94  function getLocalizedPrefix() {
95  return $this->getLocalizedData('prefix');
96  }
97 
103  function getPrefix($locale) {
104  return $this->getData('prefix', $locale);
105  }
106 
112  function setPrefix($prefix, $locale) {
113  return $this->setData('prefix', $prefix, $locale);
114  }
115 
120  function getLocalizedSubtitle() {
121  return $this->getLocalizedData('subtitle');
122  }
123 
129  function getSubtitle($locale) {
130  return $this->getData('subtitle', $locale);
131  }
132 
138  function setSubtitle($subtitle, $locale) {
139  return $this->setData('subtitle', $subtitle, $locale);
140  }
141 
146  function getPath() {
147  return $this->getData('path');
148  }
149 
154  function setPath($path) {
155  return $this->setData('path', $path);
156  }
157 
163  return $this->getLocalizedData('description');
164  }
165 
170  function getDescription($locale) {
171  return $this->getData('description', $locale);
172  }
173 
178  function setDescription($description, $locale) {
179  $this->setData('description', $description, $locale);
180  }
181 
186  function getFeatured() {
187  return $this->getData('featured');
188  }
189 
194  function setFeatured($featured) {
195  $this->setData('featured', $featured);
196  }
197 
202  function getImage() {
203  return $this->getData('image');
204  }
205 
210  function setImage($image) {
211  return $this->setData('image', $image);
212  }
213 
218  function getOnlineISSN() {
219  return $this->getData('onlineIssn');
220  }
221 
226  function setOnlineISSN($onlineIssn) {
227  return $this->setData('onlineIssn', $onlineIssn);
228  }
229 
234  function getPrintISSN() {
235  return $this->getData('printIssn');
236  }
237 
242  function setPrintISSN($printIssn) {
243  return $this->setData('printIssn', $printIssn);
244  }
245 
251  function getSortOption() {
252  return $this->getData('sortOption');
253  }
254 
260  function setSortOption($sortOption) {
261  return $this->setData('sortOption', $sortOption);
262  }
263 
269  function getEditorsString() {
270  $subEditorsDao = DAORegistry::getDAO('SubEditorsDAO'); /* @var $subEditorsDao SubEditorsDAO */
271  $editors = $subEditorsDao->getBySectionId($this->getId(), $this->getPressId());
272 
273  $separator = ', ';
274  $str = '';
275 
276  foreach ($editors as $editor) {
277  if (!empty($str)) {
278  $str .= $separator;
279  }
280 
281  $str .= $editor->getFullName();
282  $editor = null;
283  }
284 
285  return $str;
286  }
287 
292  function getIsInactive() {
293  return $this->getData('isInactive');
294  }
295 
300  function setIsInactive($isInactive) {
301  $this->setData('isInactive', $isInactive);
302  }
303 
304 }
305 
306 
Series\getOnlineISSN
getOnlineISSN()
Definition: Series.inc.php:218
Series\getLocalizedFullTitle
getLocalizedFullTitle()
Definition: Series.inc.php:80
DataObject\getData
& getData($key, $locale=null)
Definition: DataObject.inc.php:100
DataObject\getLocalizedData
getLocalizedData($key, $preferredLocale=null)
Definition: DataObject.inc.php:71
Series\setImage
setImage($image)
Definition: Series.inc.php:210
Series\setOnlineISSN
setOnlineISSN($onlineIssn)
Definition: Series.inc.php:226
Series\getIsInactive
getIsInactive()
Definition: Series.inc.php:292
Series\setSubtitle
setSubtitle($subtitle, $locale)
Definition: Series.inc.php:138
Series\getEditorsString
getEditorsString()
Definition: Series.inc.php:269
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
Series\getPath
getPath()
Definition: Series.inc.php:146
Series\getLocalizedDescription
getLocalizedDescription()
Definition: Series.inc.php:162
Series\setPath
setPath($path)
Definition: Series.inc.php:154
Series\getImage
getImage()
Definition: Series.inc.php:202
PKPString\concatTitleFields
static concatTitleFields($fields)
Definition: PKPString.inc.php:410
Series\__construct
__construct()
Definition: Series.inc.php:23
Series\getFeatured
getFeatured()
Definition: Series.inc.php:186
Series\getPrintISSN
getPrintISSN()
Definition: Series.inc.php:234
Series\setFeatured
setFeatured($featured)
Definition: Series.inc.php:194
Series\getPressId
getPressId()
Definition: Series.inc.php:31
Series
Describes basic series properties.
Definition: Series.inc.php:19
Series\getLocalizedPrefix
getLocalizedPrefix()
Definition: Series.inc.php:94
Series\getSubtitle
getSubtitle($locale)
Definition: Series.inc.php:129
Series\getLocalizedTitle
getLocalizedTitle($includePrefix=true)
Definition: Series.inc.php:48
Series\setPressId
setPressId($pressId)
Definition: Series.inc.php:39
PKPSection\setContextId
setContextId($contextId)
Definition: PKPSection.inc.php:30
PKPSection\getLocalizedTitle
getLocalizedTitle()
Definition: PKPSection.inc.php:54
Series\setPrefix
setPrefix($prefix, $locale)
Definition: Series.inc.php:112
DataObject\getId
getId()
Definition: DataObject.inc.php:206
Series\setSortOption
setSortOption($sortOption)
Definition: Series.inc.php:260
PKPSection\getContextId
getContextId()
Definition: PKPSection.inc.php:22
Series\getSortOption
getSortOption()
Definition: Series.inc.php:251
Series\setIsInactive
setIsInactive($isInactive)
Definition: Series.inc.php:300
PKPSection
Describes basic section properties.
Definition: PKPSection.inc.php:16
Series\setDescription
setDescription($description, $locale)
Definition: Series.inc.php:178
Series\getDescription
getDescription($locale)
Definition: Series.inc.php:170
Series\getPrefix
getPrefix($locale)
Definition: Series.inc.php:103
Series\getLocalizedSubtitle
getLocalizedSubtitle()
Definition: Series.inc.php:120
DataObject\setData
setData($key, $value, $locale=null)
Definition: DataObject.inc.php:132
Series\setPrintISSN
setPrintISSN($printIssn)
Definition: Series.inc.php:242
Series\getTitle
getTitle($locale, $includePrefix=true)
Definition: Series.inc.php:62