You are here

public function TamperFormBase::getPluginForm in Feeds Tamper 8.2

Ajax callback.

Returns the plugin configuration form from an ajax request.

Parameters

array $form: Drupal form array.

\Drupal\Core\Form\FormStateInterface $form_state: Form state interface.

Return value

array Plugin form.

File

src/Form/TamperFormBase.php, line 143

Class

TamperFormBase
The base class for add/edit tamper forms.

Namespace

Drupal\feeds_tamper\Form

Code

public function getPluginForm(array $form, FormStateInterface $form_state) {

  // Update label when selecting an other plugin.
  if (!$this->plugin || !$this->plugin
    ->getSetting(self::VAR_TAMPER_LABEL)) {
    $form[self::VAR_PLUGIN_CONFIGURATION][self::VAR_TAMPER_LABEL]['#value'] = $form[self::VAR_PLUGIN_CONFIGURATION][self::VAR_TAMPER_LABEL]['#default_value'];
  }
  return $form[self::VAR_PLUGIN_CONFIGURATION];
}