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
cache.backend.database core/core.services.yml Drupal\Core\Cache\DatabaseBackendFactory backend_overridable
language.current_language_context core/core.services.yml Drupal\Core\Language\ContextProvider\CurrentLanguageContext context_provider
Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface core/core.services.yml
cache.backend.apcu core/core.services.yml Drupal\Core\Cache\ApcuBackendFactory
language.default core/core.services.yml Drupal\Core\Language\LanguageDefault
placeholder_strategy.single_flush core/core.services.yml Drupal\Core\Render\Placeholder\SingleFlushStrategy placeholder_strategy
cache.backend.php core/core.services.yml Drupal\Core\Cache\PhpBackendFactory
Drupal\Core\Language\LanguageDefault core/core.services.yml
email.validator core/core.services.yml Drupal\Component\Utility\EmailValidator
cache.backend.memory core/core.services.yml Drupal\Core\Cache\MemoryBackendFactory
string_translator.custom_strings core/core.services.yml Drupal\Core\StringTranslation\Translator\CustomStrings string_translator
Drupal\Component\Utility\EmailValidatorInterface core/core.services.yml
cache.static core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
string_translation core/core.services.yml Drupal\Core\StringTranslation\TranslationManager service_collector
update.update_hook_registry core/core.services.yml Drupal\Core\Update\UpdateHookRegistry
cache.bootstrap core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
Drupal\Core\StringTranslation\TranslationInterface core/core.services.yml
Drupal\Core\Update\UpdateHookRegistry core/core.services.yml
cache.config core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
typed_data_manager core/core.services.yml Drupal\Core\TypedData\TypedDataManager plugin_manager_cache_clear
update.update_hook_registry_factory core/core.services.yml Drupal\Core\Update\UpdateHookRegistryFactory
cache.default core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
Drupal\Core\TypedData\TypedDataManagerInterface core/core.services.yml
update.post_update_registry core/core.services.yml Drupal\Core\Update\UpdateRegistry
cache.entity core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
validation.constraint core/core.services.yml Drupal\Core\Validation\ConstraintManager plugin_manager_cache_clear
update.post_update_registry_factory core/core.services.yml Drupal\Core\Update\UpdateRegistryFactory
cache.menu core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
lock core/core.services.yml Drupal\Core\Lock\DatabaseLockBackend backend_overridable
uuid core/core.services.yml Drupal\Component\Uuid\Php
cache.render core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
lock.persistent core/core.services.yml Drupal\Core\Lock\PersistentDatabaseLockBackend backend_overridable
Drupal\Component\Uuid\UuidInterface core/core.services.yml
cache.data core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
router.request_context core/core.services.yml Drupal\Core\Routing\RequestContext persist
response_filter.active_link core/core.services.yml Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
cache.discovery core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
Drupal\Core\Routing\RequestContext core/core.services.yml
response_filter.rss.relative_url core/core.services.yml Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter
cache_router_rebuild_subscriber core/core.services.yml Drupal\Core\EventSubscriber\CacheRouterRebuildSubscriber
router.admin_context core/core.services.yml Drupal\Core\Routing\AdminContext
messenger core/core.services.yml Drupal\Core\Messenger\Messenger
page_cache_request_policy core/core.services.yml Drupal\Core\PageCache\DefaultRequestPolicy service_collector
Drupal\Core\Routing\AdminContext core/core.services.yml
Drupal\Core\Messenger\MessengerInterface core/core.services.yml
Drupal\Core\PageCache\RequestPolicyInterface core/core.services.yml
router.route_provider core/core.services.yml Drupal\Core\Routing\RouteProvider backend_overridable
tempstore.private core/core.services.yml Drupal\Core\TempStore\PrivateTempStoreFactory backend_overridable
page_cache_response_policy core/core.services.yml Drupal\Core\PageCache\ChainResponsePolicy service_collector
Drupal\Core\Routing\RouteProviderInterface core/core.services.yml

Pages

Other projects