5 * Contains \Drupal\video\VideoProviderManagerInterface.
8 namespace Drupal\video;
11 * Interface for the class that gathers the provider plugins.
13 interface ProviderManagerInterface {
16 * Get an options list suitable for form elements for provider selection.
19 * An array of options keyed by plugin ID with label values.
21 public function getProvidersOptionList();
24 * Load the provider plugin definitions from a FAPI options list value.
26 * @param array $options
27 * An array of options from a form API submission.
31 public function loadDefinitionsFromOptionList($options);
34 * Get the provider applicable to the given user input.
36 * @param array $definitions
37 * A list of definitions to test against.
39 * The user input to test against the plugins.
41 * @return \Drupal\video\ProviderPluginInterface|bool
42 * The relevant plugin or FALSE on failure.
44 public function loadApplicableDefinitionMatches(array $definitions, $user_input);
47 * Load a provider from stream wrapper.
49 * @param string $stream
50 * Stream used from the file.
52 * @param Drupal\file\Entity\File $file
56 * Source file metadata.
58 * @return \Drupal\video\ProviderPluginInterface|bool
61 public function loadProviderFromStream($stream, $file, $data = array());