Example #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;
 }
Example #2
0
 /**
  * @return string
  */
 protected function _getDefaultCurrency()
 {
     return $this->_caModel->getDefaultCurrency(false);
 }
Example #3
0
 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);
 }