00001 <?php
00002
00016
00017
00022 define('REGISTRATION_OPTION_YEAR_OFFSET_FUTURE', '+10');
00023
00024 class RegistrationOption extends DataObject {
00025
00026 function RegistrationOption() {
00027 parent::DataObject();
00028 }
00029
00030
00031
00032
00033
00038 function getOptionId() {
00039 return $this->getData('optionId');
00040 }
00041
00046 function setOptionId($optionId) {
00047 return $this->setData('optionId', $optionId);
00048 }
00049
00054 function getSchedConfId() {
00055 return $this->getData('schedConfId');
00056 }
00057
00062 function setSchedConfId($schedConfId) {
00063 return $this->setData('schedConfId', $schedConfId);
00064 }
00065
00070 function getRegistrationOptionName() {
00071 return $this->getLocalizedData('name');
00072 }
00073
00079 function getName($locale) {
00080 return $this->getData('name', $locale);
00081 }
00082
00088 function setName($name, $locale) {
00089 return $this->setData('name', $name, $locale);
00090 }
00091
00096 function getCode() {
00097 return $this->getData('code');
00098 }
00099
00104 function setCode($code) {
00105 return $this->setData('code', $code);
00106 }
00107
00112 function getRegistrationOptionDescription() {
00113 return $this->getLocalizedData('description');
00114 }
00115
00121 function getDescription($locale) {
00122 return $this->getData('description', $locale);
00123 }
00124
00130 function setDescription($description, $locale) {
00131 return $this->setData('description', $description, $locale);
00132 }
00133
00138 function getCurrencyString() {
00139 $currencyDao =& DAORegistry::getDAO('CurrencyDAO');
00140 $currency =& $currencyDao->getCurrencyByAlphaCode($this->getData('currencyCodeAlpha'));
00141
00142 if ($currency != null) {
00143 return $currency->getName();
00144 } else {
00145 return 'manager.registrationOptions.currency';
00146 }
00147 }
00148
00153 function getCurrencyStringShort() {
00154 $currencyDao =& DAORegistry::getDAO('CurrencyDAO');
00155 $currency =& $currencyDao->getCurrencyByAlphaCode($this->getData('currencyCodeAlpha'));
00156
00157 if ($currency != null) {
00158 return $currency->getCodeAlpha();
00159 } else {
00160 return 'manager.registrationOptions.currency';
00161 }
00162 }
00163
00168 function getOpeningDate() {
00169 return $this->getData('openingDate');
00170 }
00171
00176 function setOpeningDate($openingDate) {
00177 return $this->setData('openingDate', $openingDate);
00178 }
00179
00184 function getClosingDate() {
00185 return $this->getData('closingDate');
00186 }
00187
00192 function setClosingDate($closingDate) {
00193 return $this->setData('closingDate', $closingDate);
00194 }
00195
00200 function getPublic() {
00201 return $this->getData('public');
00202 }
00203
00208 function setPublic($public) {
00209 return $this->setData('public', $public);
00210 }
00211
00216 function getSequence() {
00217 return $this->getData('sequence');
00218 }
00219
00224 function setSequence($sequence) {
00225 return $this->setData('sequence', $sequence);
00226 }
00227 }
00228
00229 ?>