예제 #1
0
 public function getCurrencies($forceReload = true)
 {
     if (self::$_currencies !== null && !$forceReload) {
         return self::$_currencies;
     }
     $ret = array();
     foreach ($this->fetchAll(null, 'currency_code asc') as $c) {
         $ret[$c->currency_code] = $c->currency_code;
         if ($c->is_default) {
             self::$_default = $c->currency_code;
         }
     }
     return self::$_currencies = $ret;
 }
예제 #2
0
파일: Inputdata.php 프로젝트: knatorski/SMS
 /**
  * @return string
  */
 protected function _getDefaultCurrency()
 {
     return $this->_caModel->getDefaultCurrency(false);
 }
예제 #3
0
파일: Abstract.php 프로젝트: knatorski/SMS
 protected function currency($acl = false, $fieldname = 'currency', $label = 'Waluta:', $required = null)
 {
     $currency = new CurrencyAvailable();
     $method = $acl ? 'addSupervisedElement' : 'addElement';
     $this->{$method}('select', $fieldname, array('required' => is_null($required) ? $this->default_policy : $required, 'label' => $label, 'MultiOptions' => $this->addClearStart($currency->getCurrencies())));
     $this->notEmpty($fieldname);
 }