function OEmbed::submitConfigurationForm

Same name in other branches
  1. 9 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::submitConfigurationForm()
  2. 10 core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::submitConfigurationForm()
  3. 11.x core/modules/media/src/Plugin/media/Source/OEmbed.php \Drupal\media\Plugin\media\Source\OEmbed::submitConfigurationForm()

Overrides MediaSourceBase::submitConfigurationForm

File

core/modules/media/src/Plugin/media/Source/OEmbed.php, line 338

Class

OEmbed
Provides a media source plugin for oEmbed resources.

Namespace

Drupal\media\Plugin\media\Source

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
    parent::submitConfigurationForm($form, $form_state);
    $configuration = $this->getConfiguration();
    $configuration['providers'] = array_filter(array_values($configuration['providers']));
    $this->setConfiguration($configuration);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.