class EntityProcessorOptionForm in Feeds 8.3
The configuration form for the CSV parser.
Hierarchy
- class \Drupal\feeds\Plugin\Type\ExternalPluginFormBase implements PluginFormInterface, PluginAwareInterface uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\feeds\Feeds\Processor\Form\EntityProcessorOptionForm
Expanded class hierarchy of EntityProcessorOptionForm
File
- src/
Feeds/ Processor/ Form/ EntityProcessorOptionForm.php, line 11
Namespace
Drupal\feeds\Feeds\Processor\FormView 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
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
EntityProcessorOptionForm:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
|
ExternalPluginFormBase:: |
protected | property | The Feeds plugin. | |
ExternalPluginFormBase:: |
public | function |
Sets the plugin for this object. Overrides PluginAwareInterface:: |
|
ExternalPluginFormBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
4 |
ExternalPluginFormBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
5 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |