public function addConfigurationFields(FormBuilderInterface $builder, ElementInterface $fieldset, DependencyInterface $dependency) { $fieldset->addChild($builder->getElement('text_field', ['name' => $this->getConfigurationKey('client_id'), 'label' => $this->trans('paypal.label.client_id'), 'dependencies' => [$dependency]])); $fieldset->addChild($builder->getElement('text_field', ['name' => $this->getConfigurationKey('client_secret'), 'label' => $this->trans('paypal.label.client_secret'), 'dependencies' => [$dependency]])); $fieldset->addChild($builder->getElement('select', ['name' => $this->getConfigurationKey('mode'), 'label' => $this->trans('paypal.label.mode'), 'options' => ['live' => 'live', 'sandbox' => 'sandbox'], 'dependencies' => [$dependency]])); $fieldset->addChild($builder->getElement('select', ['name' => $this->getConfigurationKey('type'), 'label' => $this->trans('paypal.label.type'), 'options' => ['paypal' => 'paypal', 'credit_card' => 'credit_card'], 'dependencies' => [$dependency]])); }
public function addConfigurationFields(FormBuilderInterface $builder, ElementInterface $fieldset, DependencyInterface $dependency) { $fieldset->addChild($builder->getElement('text_field', ['name' => $this->getConfigurationKey('account_number'), 'label' => $this->trans('payment_method.bank_transfer.account_number'), 'dependencies' => [$dependency], 'default' => ''])); $fieldset->addChild($builder->getElement('text_field', ['name' => $this->getConfigurationKey('account_owner'), 'label' => $this->trans('payment_method.bank_transfer.account_owner'), 'dependencies' => [$dependency], 'default' => ''])); $fieldset->addChild($builder->getElement('text_field', ['name' => $this->getConfigurationKey('sort_number'), 'label' => $this->trans('payment_method.bank_transfer.sort_number'), 'dependencies' => [$dependency], 'default' => ''])); }
public function addConfigurationFields(FormBuilderInterface $builder, ElementInterface $fieldset, DependencyInterface $dependency) { $fieldset->addChild($builder->getElement('tip', ['tip' => $this->trans('payment_method.cod.configuration'), 'dependencies' => [$dependency]])); }
/** * {@inheritdoc} */ protected function getFieldset(FormBuilderInterface $builder, FormInterface $form) : FieldsetInterface { $boxTypeSelect = $this->getBoxTypeSelect($form); $boxTypeSelect->addOptionToSelect($this->type, $this->type); $fieldset = $form->addChild($builder->getElement('nested_fieldset', ['name' => $this->getType(), 'label' => $this->trans('layout_box.label.settings'), 'dependencies' => [$builder->getDependency('show', ['field' => $boxTypeSelect, 'condition' => new Equals($this->type), 'form' => $form])]])); return $fieldset; }
/** * Adds background selector * * @param \DOMElement $field * * @return mixed */ protected function addFieldBackground(\DOMElement $field) { $attributes = $this->getFieldAttributes($field); $xml = simplexml_import_dom($field); return $this->builder->getElement('colour_scheme_picker', $attributes + ['gradient_height' => (string) $xml->height, 'file_source' => $this->themeDir . '/assets/images', 'type_colour' => (bool) $xml->type['colour'], 'type_gradient' => (bool) $xml->type['gradient'], 'type_image' => (bool) $xml->type['image']]); }