PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/classes/conference/Track.inc.php

https://github.com/lib-uoguelph-ca/ocs
PHP | 305 lines | 115 code | 43 blank | 147 comment | 6 complexity | 044ecf885219653ce5dfd064522bd2ff MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /**
  3. * @file Track.inc.php
  4. *
  5. * Copyright (c) 2000-2012 John Willinsky
  6. * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  7. *
  8. * @class Track
  9. * @ingroup conference
  10. * @see TrackDAO
  11. *
  12. * @brief Describes basic track properties.
  13. *
  14. */
  15. // $Id$
  16. class Track extends DataObject {
  17. /**
  18. * Constructor.
  19. */
  20. function Track() {
  21. parent::DataObject();
  22. }
  23. /**
  24. * Get localized title of conference track.
  25. * @return string
  26. */
  27. function getLocalizedTitle() {
  28. return $this->getLocalizedData('title');
  29. }
  30. function getTrackTitle() {
  31. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  32. return $this->getLocalizedTitle();
  33. }
  34. /**
  35. * Get localized abbreviation of conference track.
  36. */
  37. function getLocalizedAbbrev() {
  38. return $this->getLocalizedData('abbrev');
  39. }
  40. function getTrackAbbrev() {
  41. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  42. return $this->getLocalizedAbbrev();
  43. }
  44. //
  45. // Get/set methods
  46. //
  47. /**
  48. * Get ID of track.
  49. * @return int
  50. */
  51. function getTrackId() {
  52. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  53. return $this->getId();
  54. }
  55. /**
  56. * Set ID of track.
  57. * @param $trackId int
  58. */
  59. function setTrackId($trackId) {
  60. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  61. return $this->setId($trackId);
  62. }
  63. /**
  64. * Get ID of scheduled conference.
  65. * @return int
  66. */
  67. function getSchedConfId() {
  68. return $this->getData('schedConfId');
  69. }
  70. /**
  71. * Set ID of scheduled conference.
  72. * @param $schedConfId int
  73. */
  74. function setSchedConfId($schedConfId) {
  75. return $this->setData('schedConfId', $schedConfId);
  76. }
  77. /**
  78. * Get ID of primary review form.
  79. * @return int
  80. */
  81. function getReviewFormId() {
  82. return $this->getData('reviewFormId');
  83. }
  84. /**
  85. * Set ID of primary review form.
  86. * @param $reviewFormId int
  87. */
  88. function setReviewFormId($reviewFormId) {
  89. return $this->setData('reviewFormId', $reviewFormId);
  90. }
  91. /**
  92. * Get title of track.
  93. * @param $locale string
  94. * @return string
  95. */
  96. function getTitle($locale) {
  97. return $this->getData('title', $locale);
  98. }
  99. /**
  100. * Set title of track.
  101. * @param $title string
  102. * @param $locale string
  103. */
  104. function setTitle($title, $locale) {
  105. return $this->setData('title', $title, $locale);
  106. }
  107. /**
  108. * Get track title abbreviation.
  109. * @param $locale string
  110. * @return string
  111. */
  112. function getAbbrev($locale) {
  113. return $this->getData('abbrev', $locale);
  114. }
  115. /**
  116. * Set track title abbreviation.
  117. * @param $abbrev string
  118. * @param $locale string
  119. */
  120. function setAbbrev($abbrev, $locale) {
  121. return $this->setData('abbrev', $abbrev, $locale);
  122. }
  123. /**
  124. * Get abstract word count limit.
  125. * @return int
  126. */
  127. function getAbstractWordCount() {
  128. return $this->getData('wordCount');
  129. }
  130. /**
  131. * Set abstract word count limit.
  132. * @param $wordCount int
  133. */
  134. function setAbstractWordCount($wordCount) {
  135. return $this->setData('wordCount', $wordCount);
  136. }
  137. /**
  138. * Get sequence of track.
  139. * @return float
  140. */
  141. function getSequence() {
  142. return $this->getData('sequence');
  143. }
  144. /**
  145. * Set sequence of track.
  146. * @param $sequence float
  147. */
  148. function setSequence($sequence) {
  149. return $this->setData('sequence', $sequence);
  150. }
  151. /**
  152. * Get peer review setting of track.
  153. * @return boolean
  154. */
  155. function getMetaReviewed() {
  156. return $this->getData('metaReviewed');
  157. }
  158. /**
  159. * Set peer review setting of track.
  160. * @param $metaReviewed boolean
  161. */
  162. function setMetaReviewed($metaReviewed) {
  163. return $this->setData('metaReviewed', $metaReviewed);
  164. }
  165. /**
  166. * Get localized string identifying type of items in this track.
  167. * @return string
  168. */
  169. function getLocalizedIdentifyType() {
  170. return $this->getLocalizedData('identifyType');
  171. }
  172. function getTrackIdentifyType() {
  173. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  174. return $this->getLocalizedIdentifyType();
  175. }
  176. /**
  177. * Get string identifying type of items in this track.
  178. * @param $locale string
  179. * @return string
  180. */
  181. function getIdentifyType($locale) {
  182. return $this->getData('identifyType', $locale);
  183. }
  184. /**
  185. * Set string identifying type of items in this track.
  186. * @param $identifyType string
  187. * @param $locale string
  188. */
  189. function setIdentifyType($identifyType, $locale) {
  190. return $this->setData('identifyType', $identifyType, $locale);
  191. }
  192. /**
  193. * Return boolean indicating whether or not submissions are restricted to [track] directors.
  194. * @return boolean
  195. */
  196. function getDirectorRestricted() {
  197. return $this->getData('directorRestricted');
  198. }
  199. /**
  200. * Set whether or not submissions are restricted to [track] directors.
  201. * @param $directorRestricted boolean
  202. */
  203. function setDirectorRestricted($directorRestricted) {
  204. return $this->setData('directorRestricted', $directorRestricted);
  205. }
  206. /**
  207. * Return boolean indicating if title should be hidden in About.
  208. * @return boolean
  209. */
  210. function getHideAbout() {
  211. return $this->getData('hideAbout');
  212. }
  213. /**
  214. * Set if title should be hidden in About.
  215. * @param $hideAbout boolean
  216. */
  217. function setHideAbout($hideAbout) {
  218. return $this->setData('hideAbout', $hideAbout);
  219. }
  220. /**
  221. * Return boolean indicating if RT comments should be disabled.
  222. * @return boolean
  223. */
  224. function getDisableComments() {
  225. return $this->getData('disableComments');
  226. }
  227. /**
  228. * Set if RT comments should be disabled.
  229. * @param $disableComments boolean
  230. */
  231. function setDisableComments($disableComments) {
  232. return $this->setData('disableComments', $disableComments);
  233. }
  234. /**
  235. * Get localized track policy.
  236. * @return string
  237. */
  238. function getLocalizedPolicy() {
  239. return $this->getLocalizedData('policy');
  240. }
  241. function getTrackPolicy() {
  242. if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
  243. return $this->getLocalizedPolicy();
  244. }
  245. /**
  246. * Get policy.
  247. * @param $locale string
  248. * @return string
  249. */
  250. function getPolicy($locale) {
  251. return $this->getData('policy', $locale);
  252. }
  253. /**
  254. * Set policy.
  255. * @param $policy string
  256. * @param $locale string
  257. */
  258. function setPolicy($policy, $locale) {
  259. return $this->setData('policy', $policy, $locale);
  260. }
  261. }
  262. ?>