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 Filesort descending Class Tags
module_installer core/core.services.yml Drupal\Core\Extension\ModuleInstaller service_collector
finish_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\FinishResponseSubscriber
Drupal\Core\Extension\ModuleInstallerInterface core/core.services.yml
response_generator_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ResponseGeneratorSubscriber
extension.list.module core/core.services.yml Drupal\Core\Extension\ModuleExtensionList
redirect_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RedirectResponseSubscriber
Drupal\Core\Extension\ModuleExtensionList core/core.services.yml
redirect_leading_slashes_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RedirectLeadingSlashesSubscriber
extension.list.profile core/core.services.yml Drupal\Core\Extension\ProfileExtensionList
Drupal\Core\Extension\ProfileExtensionList core/core.services.yml
config_import_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ConfigImportSubscriber service_collector
Drupal\Core\EventSubscriber\CsrfExceptionSubscriber core/core.services.yml
extension.list.theme core/core.services.yml Drupal\Core\Extension\ThemeExtensionList
config_snapshot_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber
Drupal\Core\Extension\ThemeExtensionList core/core.services.yml
config_exclude_modules_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ExcludedModulesEventSubscriber
extension.list.theme_engine core/core.services.yml Drupal\Core\Extension\ThemeEngineExtensionList
exception.needs_installer core/core.services.yml Drupal\Core\EventSubscriber\ExceptionDetectNeedsInstallSubscriber
Drupal\Core\Extension\ThemeEngineExtensionList core/core.services.yml
exception.default_json core/core.services.yml Drupal\Core\EventSubscriber\ExceptionJsonSubscriber
extension.path.resolver core/core.services.yml Drupal\Core\Extension\ExtensionPathResolver
exception.default_html core/core.services.yml Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber
Drupal\Core\Extension\ExtensionPathResolver core/core.services.yml
exception.final core/core.services.yml Drupal\Core\EventSubscriber\FinalExceptionSubscriber
content_uninstall_validator core/core.services.yml Drupal\Core\Entity\ContentUninstallValidator module_install.uninstall_validator
exception.logger core/core.services.yml Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber
required_module_uninstall_validator core/core.services.yml Drupal\Core\Extension\RequiredModuleUninstallValidator module_install.uninstall_validator
exception.custom_page_html core/core.services.yml Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber
module_required_by_themes_uninstall_validator core/core.services.yml Drupal\Core\Extension\ModuleRequiredByThemesUninstallValidator module_install.uninstall_validator
exception.fast_404_html core/core.services.yml Drupal\Core\EventSubscriber\Fast404ExceptionHtmlSubscriber
database_driver_uninstall_validator core/core.services.yml Drupal\Core\Extension\DatabaseDriverUninstallValidator module_install.uninstall_validator
exception.enforced_form_response core/core.services.yml Drupal\Core\EventSubscriber\EnforcedFormResponseSubscriber
theme_handler core/core.services.yml Drupal\Core\Extension\ThemeHandler
route_processor_manager core/core.services.yml Drupal\Core\RouteProcessor\RouteProcessorManager service_collector
Drupal\Core\Extension\ThemeHandlerInterface core/core.services.yml
Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface core/core.services.yml
theme_installer core/core.services.yml Drupal\Core\Extension\ThemeInstaller
path_processor_manager core/core.services.yml Drupal\Core\PathProcessor\PathProcessorManager service_collector
Drupal\Core\Extension\ThemeInstallerInterface core/core.services.yml
Drupal\Core\PathProcessor\InboundPathProcessorInterface core/core.services.yml
entity.memory_cache core/core.services.yml Drupal\Core\Cache\MemoryCache\MemoryCache
Drupal\Core\PathProcessor\OutboundPathProcessorInterface core/core.services.yml
Drupal\Core\Cache\MemoryCache\MemoryCacheInterface core/core.services.yml
path_processor_decode core/core.services.yml Drupal\Core\PathProcessor\PathProcessorDecode path_processor_inbound
entity_type.manager core/core.services.yml Drupal\Core\Entity\EntityTypeManager plugin_manager_cache_clear
path_processor_front core/core.services.yml Drupal\Core\PathProcessor\PathProcessorFront path_processor_inbound
Drupal\Core\Entity\EntityTypeManagerInterface core/core.services.yml
route_processor_current core/core.services.yml Drupal\Core\RouteProcessor\RouteProcessorCurrent route_processor_outbound
entity_type.repository core/core.services.yml Drupal\Core\Entity\EntityTypeRepository
route_processor_csrf core/core.services.yml Drupal\Core\Access\RouteProcessorCsrf route_processor_outbound

Pages

Other projects