You are here

interface InstallablePluginManagerInterface in Markdown 8.2

Installable plugin manger interface.

@todo Move upstream to https://www.drupal.org/project/installable_plugins.

Hierarchy

Expanded class hierarchy of InstallablePluginManagerInterface

All classes that implement InstallablePluginManagerInterface

File

src/PluginManager/InstallablePluginManagerInterface.php, line 17

Namespace

Drupal\markdown\PluginManager
View source
interface InstallablePluginManagerInterface extends CacheableDependencyInterface, CachedDiscoveryInterface, ContainerAwareInterface, ContainerInjectionInterface, PluginManagerInterface, FallbackPluginManagerInterface {

  /**
   * Retrieves all registered plugins.
   *
   * @param array $configuration
   *   The configuration used to create plugin instances.
   * @param bool $includeFallback
   *   Flag indicating whether to include the fallback plugin.
   *
   * @return \Drupal\markdown\Plugin\Markdown\InstallablePluginInterface[]
   *   An array of installed plugins instances, keyed by plugin identifier.
   */
  public function all(array $configuration = [], $includeFallback = FALSE);

  /**
   * Creates a pre-configured instance of a plugin.
   *
   * @param string $plugin_id
   *   The ID of the plugin being instantiated.
   * @param array $configuration
   *   An array of configuration relevant to the plugin instance.
   *
   * @return \Drupal\markdown\Plugin\Markdown\InstallablePluginInterface
   *   A fully configured plugin instance.
   */
  public function createInstance($plugin_id, array $configuration = []);

  /**
   * Retrieves the first installed plugin identifier.
   *
   * @return string
   *   The first installed plugin identifier.
   */
  public function firstInstalledPluginId();

  /**
   * Retrieves the cache key to use.
   *
   * @param bool $runtime
   *   Flag indicating whether to retrieve runtime definitions.
   *
   * @return string
   *   The cache key.
   */
  public function getCacheKey($runtime = FALSE);

  /**
   * Retrieves all cache tags that the plugin manager may implement.
   *
   * @return string[]
   *   An array of cache tags.
   */
  public function getCacheTags();

  /**
   * Retrieves a definition by class name.
   *
   * @param string $className
   *   The class name to match.
   *
   * @return \Drupal\markdown\Annotation\InstallablePlugin|void
   *   The first plugin definition matching the class name or NULL if not found.
   */
  public function getDefinitionByClassName($className);

  /**
   * Retrieves a definition by library identifier.
   *
   * @param string $libraryId
   *   The library identifier to match.
   *
   * @return \Drupal\markdown\Annotation\InstallablePlugin|void
   *   The first plugin definition matching the first library identifier or
   *   NULL if not found.
   */
  public function getDefinitionByLibraryId($libraryId);

  /**
   * Gets the definition of all plugins for this type.
   *
   * @param bool $includeFallback
   *   Flag indicating whether to include the "fallback" definition.
   *
   * @return \Drupal\markdown\Annotation\InstallablePlugin[]
   *   An array of plugin definitions (empty array if no definitions were
   *   found). Keys are plugin IDs.
   */
  public function getDefinitions($includeFallback = TRUE);

  /**
   * Retrieves all installed plugins.
   *
   * @param array $configuration
   *   The configuration used to create plugin instances.
   *
   * @return \Drupal\markdown\Plugin\Markdown\InstallablePluginInterface[]
   *   An array of installed plugins instances, keyed by plugin identifier.
   */
  public function installed(array $configuration = []);

  /**
   * Retrieves installed plugin definitions.
   *
   * @return array[]
   *   An array of plugin definitions, keyed by identifier.
   */
  public function installedDefinitions();

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CachedDiscoveryInterface::clearCachedDefinitions public function Clears static and persistent plugin definition caches. 2
CachedDiscoveryInterface::useCaches public function Disable the use of caches. 2
ContainerInjectionInterface::create public static function Instantiates a new instance of this class. 70
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. 4
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. 2
FallbackPluginManagerInterface::getFallbackPluginId public function Gets a fallback id for a missing plugin. 5
InstallablePluginManagerInterface::all public function Retrieves all registered plugins. 1
InstallablePluginManagerInterface::createInstance public function Creates a pre-configured instance of a plugin. Overrides FactoryInterface::createInstance
InstallablePluginManagerInterface::firstInstalledPluginId public function Retrieves the first installed plugin identifier. 1
InstallablePluginManagerInterface::getCacheKey public function Retrieves the cache key to use. 1
InstallablePluginManagerInterface::getCacheTags public function Retrieves all cache tags that the plugin manager may implement. Overrides CacheableDependencyInterface::getCacheTags
InstallablePluginManagerInterface::getDefinitionByClassName public function Retrieves a definition by class name. 1
InstallablePluginManagerInterface::getDefinitionByLibraryId public function Retrieves a definition by library identifier. 1
InstallablePluginManagerInterface::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryInterface::getDefinitions
InstallablePluginManagerInterface::installed public function Retrieves all installed plugins. 1
InstallablePluginManagerInterface::installedDefinitions public function Retrieves installed plugin definitions. 1
MapperInterface::getInstance public function Gets a preconfigured instance of a plugin. 4