public function ProviderManager::loadProviderFromInput in Video Embed Field 8
Same name and namespace in other branches
- 8.2 src/ProviderManager.php \Drupal\video_embed_field\ProviderManager::loadProviderFromInput()
Load a provider from user input.
Parameters
string $input: Input provided from a field.
Return value
\Drupal\video_embed_field\ProviderPluginInterface|bool The loaded plugin.
Overrides ProviderManagerInterface::loadProviderFromInput
File
- src/
ProviderManager.php, line 69
Class
- ProviderManager
- Gathers the provider plugins.
Namespace
Drupal\video_embed_fieldCode
public function loadProviderFromInput($input) {
$definition = $this
->loadDefinitionFromInput($input);
return $definition ? $this
->createInstance($definition['id'], [
'input' => $input,
]) : FALSE;
}