/** * @param array $arr * @return $this */ public function setAllowedCurrencies($arr) { $this->allowedCurrencies = $arr; // @todo Has to be done twice in case allowed currencies changed since construction $oldVal = $this->fieldCurrency->dataValue(); $this->fieldCurrency = $this->buildCurrencyField(); $this->fieldCurrency->setValue($oldVal); return $this; }