You are here

interface ProviderManagerInterface in Video 8

Same name and namespace in other branches
  1. 8.2 src/ProviderManagerInterface.php \Drupal\video\ProviderManagerInterface

Interface for the class that gathers the provider plugins.

Hierarchy

Expanded class hierarchy of ProviderManagerInterface

All classes that implement ProviderManagerInterface

2 files declare their use of ProviderManagerInterface
VideoEmbedPlayerFormatter.php in src/Plugin/Field/FieldFormatter/VideoEmbedPlayerFormatter.php
VideoEmbedThumbnailFormatter.php in src/Plugin/Field/FieldFormatter/VideoEmbedThumbnailFormatter.php

File

src/ProviderManagerInterface.php, line 8

Namespace

Drupal\video
View source
interface ProviderManagerInterface {

  /**
   * Get an options list suitable for form elements for provider selection.
   *
   * @return array
   *   An array of options keyed by plugin ID with label values.
   */
  public function getProvidersOptionList();

  /**
   * Load the provider plugin definitions from a FAPI options list value.
   *
   * @param array $options
   *   An array of options from a form API submission.
   *
   * @return array
   */
  public function loadDefinitionsFromOptionList($options);

  /**
   * Get the provider applicable to the given user input.
   *
   * @param array $definitions
   *   A list of definitions to test against.
   * @param $user_input
   *   The user input to test against the plugins.
   *
   * @return \Drupal\video\ProviderPluginInterface|bool
   *   The relevant plugin or FALSE on failure.
   */
  public function loadApplicableDefinitionMatches(array $definitions, $user_input);

  /**
   * Load a provider from stream wrapper.
   *
   * @param string $stream
   *   Stream used from the file.
   *
   * @param Drupal\file\Entity\File $file
   *   The source file.
   *
   * @param array $data
   *   Source file metadata.
   *
   * @return \Drupal\video\ProviderPluginInterface|bool
   *   The loaded plugin.
   */
  public function loadProviderFromStream($stream, $file, $data = []);

}

Members

Namesort descending Modifiers Type Description Overrides
ProviderManagerInterface::getProvidersOptionList public function Get an options list suitable for form elements for provider selection. 1
ProviderManagerInterface::loadApplicableDefinitionMatches public function Get the provider applicable to the given user input. 1
ProviderManagerInterface::loadDefinitionsFromOptionList public function Load the provider plugin definitions from a FAPI options list value. 1
ProviderManagerInterface::loadProviderFromStream public function Load a provider from stream wrapper. 1