interface ProviderInterface

ProviderInterface.

Hierarchy

  • interface \Drupal\bootstrap\Plugin\Provider\ProviderInterface extends \Drupal\Component\Plugin\PluginInspectionInterface

Expanded class hierarchy of ProviderInterface

All classes that implement ProviderInterface

Related topics

2 files declare their use of ProviderInterface

Namespace

Drupal\bootstrap\Plugin\Provider
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

Contains filters are case sensitive
Namesort descending Modifiers Type Description
ProviderInterface::getApi public function Retrieves the API URL if set.
ProviderInterface::getAssets public function Retrieves Provider assets for the active provider, if any.
ProviderInterface::getDescription public function Retrieves the provider description.
ProviderInterface::getLabel public function Retrieves the provider human-readable label.
ProviderInterface::getThemes public function Retrieves the themes supported by the CDN provider.
ProviderInterface::getVersions public function Retrieves the versions supported by the CDN provider.
ProviderInterface::hasError public function Flag indicating that the API data parsing failed.
ProviderInterface::isImported public function Flag indicating that the API data was manually imported.
ProviderInterface::processApi public function Processes the provider plugin definition upon discovery.
ProviderInterface::processDefinition public function Processes the provider plugin definition upon discovery.