protected function CKEditorMediaEmbedSettingsForm::prepareEmbedProviderValidation in CKEditor Media Embed Plugin 8
Prepare the embed provider setting for validation.
Parameters
string $embed_provider: The embed provider that should be prepared for validation.
Return value
$this
1 call to CKEditorMediaEmbedSettingsForm::prepareEmbedProviderValidation()
- CKEditorMediaEmbedSettingsForm::validateForm in src/
Form/ CKEditorMediaEmbedSettingsForm.php - Form validation handler.
File
- src/
Form/ CKEditorMediaEmbedSettingsForm.php, line 149
Class
- CKEditorMediaEmbedSettingsForm
- Class CKEditorMediaEmbedSettingsForm.
Namespace
Drupal\ckeditor_media_embed\FormCode
protected function prepareEmbedProviderValidation(&$embed_provider) {
if (strpos($embed_provider, '//') === 0) {
$embed_provider = 'http:' . $embed_provider;
}
$embed_provider = str_replace('{url}', '', $embed_provider);
$embed_provider = str_replace('{callback}', '', $embed_provider);
return $this;
}