Primary tabs

Introduction to services

A "service" (such as accessing the database, sending email, or translating user interface text) can be defined by a module or Drupal core. Defining a service means giving it a name and designating a default class to provide the service; ideally, there should also be an interface that defines the methods that may be called. Services are collected into the Dependency Injection Container, and can be overridden to use different classes or different instantiation by modules. See the Services and Dependency Injection Container topic for details.

Some services have tags, which are defined in the service definition. Tags are used to define a group of related services, or to specify some aspect of how the service behaves. See the Service Tags topic for more information.

See also

Services and Dependency Injection Container

Service Tags

Name File Classsort descending Tags
Drupal\locale\LocaleProjectStorageInterface core/modules/locale/locale.services.yml
Drupal\Core\Asset\LibraryDiscoveryParser core/core.services.yml
Drupal\locale\PluralFormulaInterface core/modules/locale/locale.services.yml
Drupal\Core\Controller\TitleResolverInterface core/core.services.yml
Drupal\Core\Asset\LibrariesDirectoryFileFinder core/core.services.yml
Drupal\performance_test\PerformanceDataCollector core/modules/system/tests/modules/performance_test/performance_test.services.yml event_subscriber, needs_destruction
Symfony\Component\HttpKernel\HttpKernelInterface core/core.services.yml
Drupal\performance_test\DatabaseEventEnabler core/modules/system/tests/modules/performance_test/performance_test.services.yml http_middleware
_defaults core/modules/media/media.services.yml
Drupal\Core\Asset\LibraryDependencyResolverInterface core/core.services.yml
Drupal\media\OEmbed\UrlResolverInterface core/modules/media/media.services.yml
Drupal\media\OEmbed\ProviderRepositoryInterface core/modules/media/media.services.yml
Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface core/core.services.yml
Drupal\Core\Asset\AssetResolverInterface core/core.services.yml
Drupal\media\OEmbed\ResourceFetcherInterface core/modules/media/media.services.yml
Drupal\media\IFrameUrlHelper core/modules/media/media.services.yml
Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface core/core.services.yml
Drupal\Core\Extension\InfoParserInterface core/core.services.yml
logger.channel.system core/modules/system/system.services.yml
_defaults core/modules/media_library/media_library.services.yml
Drupal\media_library\MediaLibraryUiBuilder core/modules/media_library/media_library.services.yml
Drupal\Core\Template\TwigEnvironment core/core.services.yml
Drupal\media_library\OpenerResolverInterface core/modules/media_library/media_library.services.yml
_defaults core/modules/migrate/migrate.services.yml
Drupal\migrate\Plugin\MigrationPluginManagerInterface core/modules/migrate/migrate.services.yml
Drupal\migrate\MigrateBuildDependencyInterface core/modules/migrate/migrate.services.yml
Twig\Loader\LoaderInterface core/core.services.yml
Drupal\migrate\MigrateLookupInterface core/modules/migrate/migrate.services.yml
Drupal\migrate\MigrateStubInterface core/modules/migrate/migrate.services.yml
Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\migrate_drupal\FieldDiscoveryInterface core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\migrate_drupal\MigrationState core/modules/migrate_drupal/migrate_drupal.services.yml
Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface core/core.services.yml
Drupal\Core\File\HtaccessWriterInterface core/core.services.yml
Psr\Http\Message\ServerRequestFactoryInterface core/core.services.yml
_defaults core/modules/node/node.services.yml
Psr\Http\Message\StreamFactoryInterface core/core.services.yml
Drupal\Core\Cache\CacheFactoryInterface core/core.services.yml
Drupal\node\NodeGrantDatabaseStorageInterface core/modules/node/node.services.yml
Drupal\Core\Render\PlaceholderGeneratorInterface core/core.services.yml
Psr\Http\Message\UploadedFileFactoryInterface core/core.services.yml
Drupal\Core\Cache\Context\CacheContextsManager core/core.services.yml
_defaults core/modules/path_alias/path_alias.services.yml
Drupal\Core\Render\RenderCacheInterface core/core.services.yml
Drupal\path_alias\AliasManagerInterface core/modules/path_alias/path_alias.services.yml
Psr\Http\Message\ResponseFactoryInterface core/core.services.yml
Drupal\menu_ui\Menu\MenuUiMenuTreeManipulators core/modules/menu_ui/menu_ui.services.yml
Drupal\Core\Cache\CacheTagsInvalidatorInterface core/core.services.yml
Drupal\path_alias\AliasRepositoryInterface core/modules/path_alias/path_alias.services.yml
Drupal\Core\Render\RendererInterface core/core.services.yml

Pages

Other projects