/** * Constructor * * @param WalletId $walletId * @param UserId $userId * @param string $name * @param string $coin * @param $token * @param \DateTime $creationTime * @throws \Exception */ function __construct(WalletId $walletId, UserId $userId, $name, $coin, $token, \DateTime $creationTime) { WalletCoinSymbol::validate($coin, 'WalletCoinSymbol'); $this->id = $walletId; $this->userId = $userId; $this->name = $name; $this->coinSymbol = $coin; $this->token = $token; $this->creationTime = clone $creationTime; }
/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name', 'text', array('required' => true))->add('coinSymbol', 'choice', array('choices' => WalletCoinSymbol::flippedValues(), 'required' => true, 'placeholder' => 'Choose a blockchain')); }