ContainerDeriverInterface.php 771 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Drupal\Core\Plugin\Discovery;
  3. use Drupal\Component\Plugin\Derivative\DeriverInterface;
  4. use Symfony\Component\DependencyInjection\ContainerInterface;
  5. /**
  6. * Provides additional plugin definitions based on an existing definition using
  7. * service injection.
  8. */
  9. interface ContainerDeriverInterface extends DeriverInterface {
  10. /**
  11. * Creates a new class instance.
  12. *
  13. * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
  14. * The container to pull out services used in the fetcher.
  15. * @param string $base_plugin_id
  16. * The base plugin ID for the plugin ID.
  17. *
  18. * @return static
  19. * Returns an instance of this fetcher.
  20. */
  21. public static function create(ContainerInterface $container, $base_plugin_id);
  22. }