class CsvParserForm 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\Parser\Form\CsvParserForm
Expanded class hierarchy of CsvParserForm
1 file declares its use of CsvParserForm
- CsvParserFormTest.php in tests/
src/ Unit/ Feeds/ Parser/ Form/ CsvParserFormTest.php
File
- src/
Feeds/ Parser/ Form/ CsvParserForm.php, line 11
Namespace
Drupal\feeds\Feeds\Parser\FormView source
class CsvParserForm extends ExternalPluginFormBase {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['delimiter'] = [
'#type' => 'select',
'#title' => $this
->t('Default delimiter'),
'#description' => $this
->t('Default field delimiter.'),
'#options' => [
',' => ',',
';' => ';',
'TAB' => 'TAB',
'|' => '|',
'+' => '+',
],
'#default_value' => $this->plugin
->getConfiguration('delimiter'),
];
$form['no_headers'] = [
'#type' => 'checkbox',
'#title' => $this
->t('No headers'),
'#description' => $this
->t("Check if the imported CSV file does not start with a header row. If checked, mapping sources must be named '0', '1', '2' etc."),
'#default_value' => $this->plugin
->getConfiguration('no_headers'),
];
return $form;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CsvParserForm:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
|
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 | |
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. |