<?php
namespace App\Form\Input;

class Select_Currency extends \Engine\Form\Input\Select
{
	/**
	 * (non-PHPdoc)
	 * @see \Engine\Form\Input\Select::determinePossibleValues()
	 */
	protected function determinePossibleValues()
	{
		$assocCurr=[];
		foreach(\App\Config\Currencies::getInstance()->getSimple() as $c) {
			$assocCurr[$c]=$c;
		}

		return $assocCurr;
	}

	/**
	 * Populates the possibleValues attribute.
	 * @see \Engine\Form\Input\Select::getTemplateParams()
	 */
	protected function getTemplateParams($templateClass = null, $parentElement = null)
	{
		// update the width
		$this->setStyle('width', '');

		// execute parent method
		return parent::getTemplateParams($templateClass, $parentElement);
	}

}
