You are here

interface ProviderInterface in Express 8

ProviderInterface.

Hierarchy

Expanded class hierarchy of ProviderInterface

All classes that implement ProviderInterface

2 files declare their use of ProviderInterface
CdnProvider.php in themes/contrib/bootstrap/src/Plugin/Setting/Advanced/Cdn/CdnProvider.php
Contains \Drupal\bootstrap\Plugin\Setting\Advanced\Cdn\CdnProvider.
ProviderManager.php in themes/contrib/bootstrap/src/Plugin/ProviderManager.php
Contains \Drupal\bootstrap\Plugin\ProviderManager.

File

themes/contrib/bootstrap/src/Plugin/Provider/ProviderInterface.php, line 17
Contains \Drupal\bootstrap\Plugin\Provider\ProviderInterface.

Namespace

Drupal\bootstrap\Plugin\Provider
View source
interface ProviderInterface extends PluginInspectionInterface, DerivativeInspectionInterface {

  /**
   * Retrieves the API URL if set.
   *
   * @return string
   *   The API URL.
   */
  public function getApi();

  /**
   * Retrieves Provider assets for the active provider, if any.
   *
   * @param string|array $types
   *   The type of asset to retrieve: "css" or "js", defaults to an array
   *   array containing both if not set.
   *
   * @return array
   *   If $type is a string or an array with only one (1) item in it, the
   *   assets are returned as an indexed array of files. Otherwise, an
   *   associative array is returned keyed by the type.
   */
  public function getAssets($types = NULL);

  /**
   * Retrieves the provider description.
   *
   * @return string
   *   The provider description.
   */
  public function getDescription();

  /**
   * Retrieves the provider human-readable label.
   *
   * @return string
   *   The provider human-readable label.
   */
  public function getLabel();

  /**
   * Retrieves the themes supported by the CDN provider.
   *
   * @return array
   *   An array of themes. If the CDN provider does not support any it will
   *   just be an empty array.
   */
  public function getThemes();

  /**
   * Retrieves the versions supported by the CDN provider.
   *
   * @return array
   *   An array of versions. If the CDN provider does not support any it will
   *   just be an empty array.
   */
  public function getVersions();

  /**
   * Flag indicating that the API data parsing failed.
   *
   * @return bool
   *   TRUE or FALSE
   */
  public function hasError();

  /**
   * Flag indicating that the API data was manually imported.
   *
   * @return bool
   *   TRUE or FALSE
   */
  public function isImported();

  /**
   * Processes the provider plugin definition upon discovery.
   *
   * @param array $definition
   *   The provider plugin definition.
   * @param string $plugin_id
   *   The plugin identifier.
   */
  public function processDefinition(array &$definition, $plugin_id);

  /**
   * Processes the provider plugin definition upon discovery.
   *
   * @param array $json
   *   The JSON data retrieved from the API request.
   * @param array $definition
   *   The provider plugin definition.
   */
  public function processApi(array $json, array &$definition);

}

Members

Namesort descending Modifiers Type Description Overrides
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
ProviderInterface::getApi public function Retrieves the API URL if set. 1
ProviderInterface::getAssets public function Retrieves Provider assets for the active provider, if any. 1
ProviderInterface::getDescription public function Retrieves the provider description. 1
ProviderInterface::getLabel public function Retrieves the provider human-readable label. 1
ProviderInterface::getThemes public function Retrieves the themes supported by the CDN provider. 1
ProviderInterface::getVersions public function Retrieves the versions supported by the CDN provider. 1
ProviderInterface::hasError public function Flag indicating that the API data parsing failed. 1
ProviderInterface::isImported public function Flag indicating that the API data was manually imported. 1
ProviderInterface::processApi public function Processes the provider plugin definition upon discovery. 1
ProviderInterface::processDefinition public function Processes the provider plugin definition upon discovery. 1