You are here

interface ServiceInterface in Purge 8.3

Describes a generic service for all DIC-registered service classes by Purge.

Hierarchy

Expanded class hierarchy of ServiceInterface

All classes that implement ServiceInterface

8 files declare their use of ServiceInterface
DiagnosticsServiceInterface.php in src/Plugin/Purge/DiagnosticCheck/DiagnosticsServiceInterface.php
InvalidationsServiceInterface.php in src/Plugin/Purge/Invalidation/InvalidationsServiceInterface.php
ProcessorsServiceInterface.php in src/Plugin/Purge/Processor/ProcessorsServiceInterface.php
PurgersServiceInterface.php in src/Plugin/Purge/Purger/PurgersServiceInterface.php
QueuersServiceInterface.php in src/Plugin/Purge/Queuer/QueuersServiceInterface.php

... See full list

File

src/ServiceInterface.php, line 11

Namespace

Drupal\purge
View source
interface ServiceInterface extends ServiceProviderInterface, ServiceModifierInterface {

  /**
   * Retrieve a list of all available plugins providing the service.
   *
   * @return array[]
   *   Associative array with plugin definitions and the plugin_id in each key.
   *
   * @see \Drupal\Component\Plugin\PluginManagerInterface::getDefinitions()
   */
  public function getPlugins();

  /**
   * Retrieve the configured plugin_ids that the service will use.
   *
   * @return string[]
   *   Array with the plugin_ids of the enabled plugins.
   */
  public function getPluginsEnabled();

  /**
   * Find out whether the given plugin_id is enabled.
   *
   * @param string $plugin_id
   *   The plugin_id of the plugin you want to check for.
   *
   * @return bool
   *   Whether the plugin is enabled.
   */
  public function isPluginEnabled($plugin_id);

  /**
   * Reload the service and reinstantiate all enabled plugins.
   *
   * @warning
   *   Reloading a service implies that all cached data will be reset and that
   *   plugins get reinstantiated during the current request, which should
   *   normally not be used. This method is specifically used in tests.
   */
  public function reload();

}

Members

Namesort descending Modifiers Type Description Overrides
ServiceInterface::getPlugins public function Retrieve a list of all available plugins providing the service. 1
ServiceInterface::getPluginsEnabled public function Retrieve the configured plugin_ids that the service will use. 1
ServiceInterface::isPluginEnabled public function Find out whether the given plugin_id is enabled. 1
ServiceInterface::reload public function Reload the service and reinstantiate all enabled plugins. 1
ServiceModifierInterface::alter public function Modifies existing service definitions. 13
ServiceProviderInterface::register public function Registers services to the container. 14