public function ParserBase::buildForm in Feeds XPath Parser 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- lib/
Drupal/ feeds_xpathparser/ ParserBase.php, line 361 - Contains \Drupal\feeds_xpathparser\ParserBase.
Class
- ParserBase
- Base class for the HTML and XML parsers.
Namespace
Drupal\feeds_xpathparserCode
public function buildForm(array $form, array &$form_state) {
$config = $this
->getConfig();
$form = $this
->baseForm($form, $form_state, $config);
$form['context']['#required'] = FALSE;
$form['allow_override'] = array(
'#type' => 'checkbox',
'#title' => t('Allow source configuration override'),
'#description' => t('This setting allows feeds to specify their own XPath values for the context and sources.'),
'#default_value' => $config['allow_override'],
);
return parent::buildForm($form, $form_state);
}