You are here

ConfigurablePluginBase.php in Feeds 8.3

File

src/Plugin/Type/ConfigurablePluginBase.php
View source
<?php

namespace Drupal\feeds\Plugin\Type;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginFormInterface;

/**
 * Base class for Feeds plugins that have configuration forms.
 */
abstract class ConfigurablePluginBase extends PluginBase implements PluginFormInterface {

  /**
   * {@inheritdoc}
   */
  public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {

    // Validation is optional.
  }

  /**
   * {@inheritdoc}
   */
  public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
    $this
      ->setConfiguration($form_state
      ->getValues());
  }

}

Classes

Namesort descending Description
ConfigurablePluginBase Base class for Feeds plugins that have configuration forms.