Services - 10.3.x - drupal

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

File

core/core.api.php, line 900

Title File name Summary All service tags
argument_resolver.route_match core/core.services.yml Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver
asset.css.collection_grouper core/core.services.yml Drupal\Core\Asset\CssCollectionGrouper
asset.css.collection_optimizer core/core.services.yml Drupal\Core\Asset\CssCollectionOptimizerLazy
asset.css.collection_renderer core/core.services.yml Drupal\Core\Asset\CssCollectionRenderer
asset.css.dumper core/core.services.yml Drupal\Core\Asset\AssetDumper
asset.css.optimizer core/core.services.yml Drupal\Core\Asset\CssOptimizer
asset.js.collection_grouper core/core.services.yml Drupal\Core\Asset\JsCollectionGrouper
asset.js.collection_optimizer core/core.services.yml Drupal\Core\Asset\JsCollectionOptimizerLazy
asset.js.collection_renderer core/core.services.yml Drupal\Core\Asset\JsCollectionRenderer
asset.js.dumper core/core.services.yml Drupal\Core\Asset\AssetDumper
asset.js.optimizer core/core.services.yml Drupal\Core\Asset\JsOptimizer
asset.query_string core/core.services.yml Drupal\Core\Asset\AssetQueryString
asset.resolver core/core.services.yml Drupal\Core\Asset\AssetResolver
authentication core/core.services.yml Drupal\Core\Authentication\AuthenticationManager
authentication_collector core/core.services.yml Drupal\Core\Authentication\AuthenticationCollector service_collector
authentication_subscriber core/core.services.yml Drupal\Core\EventSubscriber\AuthenticationSubscriber
automated_cron.subscriber core/modules/automated_cron/automated_cron.services.yml Drupal\automated_cron\EventSubscriber\AutomatedCron
ban.ip_manager core/modules/ban/ban.services.yml Drupal\ban\BanIpManager backend_overridable
ban.middleware core/modules/ban/ban.services.yml Drupal\ban\BanMiddleware http_middleware
bare_html_page_renderer core/core.services.yml Drupal\Core\Render\BareHtmlPageRenderer
basic_auth.authentication.basic_auth core/modules/basic_auth/basic_auth.services.yml Drupal\basic_auth\Authentication\Provider\BasicAuth authentication_provider
basic_auth.page_cache_request_policy.disallow_basic_auth_requests core/modules/basic_auth/basic_auth.services.yml Drupal\basic_auth\PageCache\DisallowBasicAuthRequests page_cache_request_policy
batch.storage core/core.services.yml Drupal\Core\Batch\BatchStorage backend_overridable
big_pipe core/modules/big_pipe/big_pipe.services.yml Drupal\big_pipe\Render\BigPipe
big_pipe_test_subscriber core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.services.yml Drupal\big_pipe_test\EventSubscriber\BigPipeTestSubscriber
block.page_display_variant_subscriber core/modules/block/block.services.yml Drupal\block\EventSubscriber\BlockPageDisplayVariantSubscriber
block.repository core/modules/block/block.services.yml Drupal\block\BlockRepository
block_content.bc_subscriber core/modules/block_content/block_content.services.yml Drupal\block_content\Routing\RouteSubscriber
block_content.uuid_lookup core/modules/block_content/block_content.services.yml \Drupal\block_content\BlockContentUuidLookup needs_destruction
block_test.multiple_static_context core/modules/block/tests/modules/block_test/block_test.services.yml Drupal\block_test\ContextProvider\MultipleStaticContext context_provider
book.backend_chained_cache core/modules/book/book.services.yml Drupal\Core\Cache\BackendChain cache.bin.memory
book.breadcrumb core/modules/book/book.services.yml Drupal\book\BookBreadcrumbBuilder breadcrumb_builder
book.export core/modules/book/book.services.yml Drupal\book\BookExport
book.manager core/modules/book/book.services.yml Drupal\book\BookManager
book.memory_cache core/modules/book/book.services.yml Drupal\Core\Cache\MemoryCache\MemoryCacheInterface cache.bin.memory
book.outline core/modules/book/book.services.yml Drupal\book\BookOutline
book.outline_storage core/modules/book/book.services.yml Drupal\book\BookOutlineStorage backend_overridable
book.uninstall_validator core/modules/book/book.services.yml Drupal\book\BookUninstallValidator module_install.uninstall_validator
breadcrumb core/core.services.yml Drupal\Core\Breadcrumb\BreadcrumbManager service_collector
breakpoint.manager core/modules/breakpoint/breakpoint.services.yml Drupal\breakpoint\BreakpointManager plugin_manager_cache_clear
broken_class_with_missing_dependency core/modules/system/tests/modules/error_service_test/error_service_test.services.yml Drupal\error_service_test\LonelyMonkeyClass
cache.access_policy core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
cache.access_policy_memory core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin.memory
cache.backend.apcu core/core.services.yml Drupal\Core\Cache\ApcuBackendFactory
cache.backend.chainedfast core/core.services.yml Drupal\Core\Cache\ChainedFastBackendFactory
cache.backend.database core/core.services.yml Drupal\Core\Cache\DatabaseBackendFactory backend_overridable
cache.backend.memory core/core.services.yml Drupal\Core\Cache\MemoryBackendFactory
cache.backend.memory.memory core/core.services.yml Drupal\Core\Cache\MemoryCache\MemoryCacheFactory
cache.backend.null core/assets/scaffold/files/development.services.yml Drupal\Core\Cache\NullBackendFactory
cache.backend.null sites/development.services.yml Drupal\Core\Cache\NullBackendFactory

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.