You are here

class EntityProcessorOptionForm in Feeds 8.3

The configuration form for the CSV parser.

Hierarchy

Expanded class hierarchy of EntityProcessorOptionForm

File

src/Feeds/Processor/Form/EntityProcessorOptionForm.php, line 11

Namespace

Drupal\feeds\Feeds\Processor\Form
View source
class EntityProcessorOptionForm extends ExternalPluginFormBase {

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

    // @todo Remove hack.
    $entity_type = \Drupal::entityTypeManager()
      ->getDefinition($this->plugin
      ->entityType());
    if ($bundle_key = $entity_type
      ->getKey('bundle')) {
      $form['values'][$bundle_key] = [
        '#type' => 'select',
        '#options' => $this->plugin
          ->bundleOptions(),
        '#title' => $this->plugin
          ->bundleLabel(),
        '#required' => TRUE,
        '#default_value' => $this->plugin
          ->bundle() ?: key($this->plugin
          ->bundleOptions()),
        '#disabled' => $this->plugin
          ->isLocked(),
      ];
    }
    return $form;
  }

}

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
EntityProcessorOptionForm::buildConfigurationForm public function Form constructor. Overrides PluginFormInterface::buildConfigurationForm
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
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.