You are here

public function ParserBase::mappingFormAlter in Feeds extensible parsers 8

Alter mapping form.

Parameters

array $form: The mapping form definition.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the mapping form.

Overrides ParserBase::mappingFormAlter

File

src/Feeds/Parser/ParserBase.php, line 498

Class

ParserBase
The Feeds extensible parser.

Namespace

Drupal\feeds_ex\Feeds\Parser

Code

public function mappingFormAlter(array &$form, FormStateInterface $form_state) {
  if ($this
    ->hasConfigurableContext()) {
    $form['context'] = [
      '#type' => 'textfield',
      '#title' => $this
        ->t('Context'),
      '#default_value' => $this->configuration['context']['value'],
      '#description' => $this
        ->t('The base query to run. See the <a href=":link" target="_new">Context query documentation</a> for more information.', [
        ':link' => 'https://www.drupal.org/node/3227985',
      ]),
      '#size' => 50,
      '#required' => TRUE,
      '#maxlength' => 1024,
      '#weight' => -50,
    ];
  }
  parent::mappingFormAlter($form, $form_state);
}