/** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state, $method = NULL) { $definition = \Drupal::service('plugin.manager.uc_payment.method')->getDefinition($method); $form['#title'] = $this->t('@method settings', ['@method' => $definition['name']]); $this->instance = \Drupal::service('plugin.manager.uc_payment.method')->createInstance($method); $this->settings = $this->instance->getSettingsForm(); $form = $this->settings->buildForm($form, $form_state); return parent::buildForm($form, $form_state); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); $this->plugin->submitConfigurationForm($form['settings'], $form_state); }