You are here

abstract class ExternalPluginFormBase in Feeds 8.3

Base class for Feeds plugins that have external configuration forms.

Hierarchy

Expanded class hierarchy of ExternalPluginFormBase

10 files declare their use of ExternalPluginFormBase
CsvParserFeedForm.php in src/Feeds/Parser/Form/CsvParserFeedForm.php
CsvParserForm.php in src/Feeds/Parser/Form/CsvParserForm.php
DefaultEntityProcessorForm.php in src/Feeds/Processor/Form/DefaultEntityProcessorForm.php
DirectoryFetcherFeedForm.php in src/Feeds/Fetcher/Form/DirectoryFetcherFeedForm.php
DirectoryFetcherForm.php in src/Feeds/Fetcher/Form/DirectoryFetcherForm.php

... See full list

File

src/Plugin/Type/ExternalPluginFormBase.php, line 14

Namespace

Drupal\feeds\Plugin\Type
View source
abstract class ExternalPluginFormBase implements PluginFormInterface, PluginAwareInterface {
  use StringTranslationTrait;
  use DependencySerializationTrait;

  /**
   * The Feeds plugin.
   *
   * @var \Drupal\feeds\Plugin\Type\FeedsPluginInterface
   */
  protected $plugin;

  /**
   * {@inheritdoc}
   */
  public function setPlugin(FeedsPluginInterface $plugin) {
    $this->plugin = $plugin;
  }

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

    // Validation is optional.
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
ExternalPluginFormBase::$plugin protected property The Feeds plugin.
ExternalPluginFormBase::setPlugin public function Sets the plugin for this object. Overrides PluginAwareInterface::setPlugin
ExternalPluginFormBase::submitConfigurationForm public function Form submission handler. Overrides PluginFormInterface::submitConfigurationForm 4
ExternalPluginFormBase::validateConfigurationForm public function Form validation handler. Overrides PluginFormInterface::validateConfigurationForm 5
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.