public function FeedsYouTubeFetcherForm::submitConfigurationForm in Feeds: YouTube Parser 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().
Overrides ExternalPluginFormBase::submitConfigurationForm
File
- src/
Feeds/ Fetcher/ Form/ FeedsYouTubeFetcherForm.php, line 64
Class
- FeedsYouTubeFetcherForm
- The configuration form for YouTube fetchers.
Namespace
Drupal\feeds_youtube\Feeds\Fetcher\FormCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// Trim all values before saving.
$values = $form_state
->getValues();
foreach ($values as &$value) {
if (is_string($value)) {
$value = trim($value);
}
}
$this->plugin
->setConfiguration($values);
}