コード例 #1
0
ファイル: CurrencyContext.php プロジェクト: Avazanga1/Sylius
 public function getCurrency()
 {
     if (null !== ($user = $this->getUser()) && null !== $user->getCurrency()) {
         return $user->getCurrency();
     }
     return parent::getCurrency();
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('amount', 'sylius_money', array('label' => 'sylius.form.payment_method.fee_calculator.fixed.amount', 'currency' => $this->currencyContext->getCurrency()));
 }