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
cache_context.views_test_cache_context core/modules/views/tests/modules/views_test_data/views_test_data.services.yml Drupal\views_test_data\Cache\ViewsTestCacheContext cache.context
cache_context.workspace core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceCacheContext cache.context
cache_contexts_manager core/core.services.yml Drupal\Core\Cache\Context\CacheContextsManager
cache_factory core/core.services.yml Drupal\Core\Cache\CacheFactory
cache_router_rebuild_subscriber core/core.services.yml Drupal\Core\EventSubscriber\CacheRouterRebuildSubscriber
cache_tags.invalidator core/core.services.yml Drupal\Core\Cache\CacheTagsInvalidator service_collector
cache_tags.invalidator.checksum core/core.services.yml Drupal\Core\Cache\DatabaseCacheTagsChecksum cache_tags_invalidator, backend_overridable
callable_resolver core/core.services.yml Drupal\Core\Utility\CallableResolver
ckeditor5.ckeditor5_cache_tag core/modules/ckeditor5/ckeditor5.services.yml Drupal\ckeditor5\EventSubscriber\CKEditor5CacheTag
ckeditor5.smart_default_settings core/modules/ckeditor5/ckeditor5.services.yml Drupal\ckeditor5\SmartDefaultSettings
ckeditor5.stylesheets.message core/modules/ckeditor5/ckeditor5.services.yml Drupal\ckeditor5\CKEditor5StylesheetsMessage
class_resolver core/core.services.yml Drupal\Core\DependencyInjection\ClassResolver
client_error_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ClientErrorResponseSubscriber
comment.breadcrumb core/modules/comment/comment.services.yml Drupal\comment\CommentBreadcrumbBuilder breadcrumb_builder
comment.lazy_builders core/modules/comment/comment.services.yml Drupal\comment\CommentLazyBuilders
comment.link_builder core/modules/comment/comment.services.yml Drupal\comment\CommentLinkBuilder
comment.manager core/modules/comment/comment.services.yml Drupal\comment\CommentManager
comment.statistics core/modules/comment/comment.services.yml Drupal\comment\CommentStatistics backend_overridable
config.checkpoints core/core.services.yml Drupal\Core\Config\Checkpoint\LinearHistory
config.config_subscriber core/modules/config/config.services.yml Drupal\config\ConfigSubscriber
config.factory core/core.services.yml Drupal\Core\Config\ConfigFactory service_collector
config.importer_subscriber core/core.services.yml Drupal\Core\Config\Importer\FinalMissingContentSubscriber
config.import_transformer core/core.services.yml Drupal\Core\Config\ImportStorageTransformer
config.installer core/core.services.yml Drupal\Core\Config\ConfigInstaller
config.manager core/core.services.yml Drupal\Core\Config\ConfigManager
config.storage core/core.services.yml Drupal\Core\Config\CachedStorage
config.storage.active core/core.services.yml Drupal\Core\Config\DatabaseStorage backend_overridable
config.storage.checkpoint core/core.services.yml Drupal\Core\Config\Checkpoint\CheckpointStorage
config.storage.export core/core.services.yml Drupal\Core\Config\ManagedStorage
config.storage.export.manager core/core.services.yml Drupal\Core\Config\ExportStorageManager
config.storage.schema core/core.services.yml Drupal\Core\Config\ExtensionInstallStorage
config.storage.snapshot core/core.services.yml Drupal\Core\Config\DatabaseStorage backend_overridable
config.storage.sync core/core.services.yml Drupal\Core\Config\FileStorage
config.typed core/core.services.yml Drupal\Core\Config\TypedConfigManager plugin_manager_cache_clear
config_collection_install_test.event_subscriber core/modules/config/tests/config_collection_install_test/config_collection_install_test.services.yml Drupal\config_collection_install_test\EventSubscriber
config_events_test.event_subscriber core/modules/config/tests/config_events_test/config_events_test.services.yml Drupal\config_events_test\EventSubscriber
config_exclude_modules_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ExcludedModulesEventSubscriber
config_import_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ConfigImportSubscriber service_collector
config_import_test.event_subscriber core/modules/config/tests/config_import_test/config_import_test.services.yml Drupal\config_import_test\EventSubscriber
config_override_integration_test.config_override core/modules/config/tests/config_override_integration_test/config_override_integration_test.services.yml Drupal\config_override_integration_test\CacheabilityMetadataConfigOverride config.factory.override
config_override_test.low_priority_overrider core/modules/config/tests/config_override_test/config_override_test.services.yml Drupal\config_override_test\ConfigOverriderLowPriority config.factory.override
config_override_test.overrider core/modules/config/tests/config_override_test/config_override_test.services.yml Drupal\config_override_test\ConfigOverrider config.factory.override
config_override_test.pirate_day_cacheability_metadata_override core/modules/config/tests/config_override_test/config_override_test.services.yml Drupal\config_override_test\PirateDayCacheabilityMetadataConfigOverride config.factory.override
config_snapshot_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber
config_transformer_test.event_subscriber core/modules/config/tests/config_transformer_test/config_transformer_test.services.yml Drupal\config_transformer_test\EventSubscriber
config_translation.access.form core/modules/config_translation/config_translation.services.yml Drupal\config_translation\Access\ConfigTranslationFormAccess access_check
config_translation.access.overview core/modules/config_translation/config_translation.services.yml Drupal\config_translation\Access\ConfigTranslationOverviewAccess access_check
config_translation.route_subscriber core/modules/config_translation/config_translation.services.yml Drupal\config_translation\Routing\RouteSubscriber
config_translation_test_event_subscriber core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.services.yml Drupal\config_translation_test\EventSubscriber\ConfigTranslationTestSubscriber
contact.mail_handler core/modules/contact/contact.services.yml Drupal\contact\MailHandler

Other projects


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