You are here

Services in Drupal 10

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

Namesort descending File Class Tags
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.config_subscriber core/modules/config/config.services.yml Drupal\config\ConfigSubscriber event_subscriber
config.factory core/core.services.yml Drupal\Core\Config\ConfigFactory event_subscriber, service_collector
config.importer_subscriber core/core.services.yml Drupal\Core\Config\Importer\FinalMissingContentSubscriber event_subscriber
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.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_events_test.event_subscriber core/modules/config/tests/config_collection_install_test/config_collection_install_test.services.yml Drupal\config_collection_install_test\EventSubscriber event_subscriber
config_events_test.event_subscriber core/modules/config/tests/config_events_test/config_events_test.services.yml Drupal\config_events_test\EventSubscriber event_subscriber
config_exclude_modules_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ExcludedModulesEventSubscriber event_subscriber
config_import_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ConfigImportSubscriber event_subscriber, service_collector
config_import_test.event_subscriber core/modules/config/tests/config_import_test/config_import_test.services.yml Drupal\config_import_test\EventSubscriber event_subscriber
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 event_subscriber
config_transformer_test.event_subscriber core/modules/config/tests/config_transformer_test/config_transformer_test.services.yml Drupal\config_transformer_test\EventSubscriber event_subscriber
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 event_subscriber
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 event_subscriber
contact.mail_handler core/modules/contact/contact.services.yml Drupal\contact\MailHandler
container.namespaces core/core.services.yml ArrayObject
container.trait core/core.services.yml Abstract
content_moderation.config_import_subscriber core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\EventSubscriber\ConfigImportSubscriber event_subscriber
content_moderation.moderation_information core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\ModerationInformation
content_moderation.route_subscriber core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\Routing\ContentModerationRouteSubscriber event_subscriber
content_moderation.state_transition_validation core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\StateTransitionValidation
content_translation.delete_access core/modules/content_translation/content_translation.services.yml Drupal\content_translation\Access\ContentTranslationDeleteAccess access_check
content_translation.manager core/modules/content_translation/content_translation.services.yml Drupal\content_translation\ContentTranslationManager
content_translation.manage_access core/modules/content_translation/content_translation.services.yml Drupal\content_translation\Access\ContentTranslationManageAccessCheck access_check
content_translation.overview_access core/modules/content_translation/content_translation.services.yml Drupal\content_translation\Access\ContentTranslationOverviewAccess access_check
content_translation.subscriber core/modules/content_translation/content_translation.services.yml Drupal\content_translation\Routing\ContentTranslationRouteSubscriber event_subscriber
content_translation.synchronizer core/modules/content_translation/content_translation.services.yml Drupal\content_translation\FieldTranslationSynchronizer
content_type_header_matcher core/core.services.yml Drupal\Core\Routing\ContentTypeHeaderMatcher route_filter
content_uninstall_validator core/core.services.yml Drupal\Core\Entity\ContentUninstallValidator module_install.uninstall_validator
context.handler core/core.services.yml Drupal\Core\Plugin\Context\ContextHandler
context.repository core/core.services.yml Drupal\Core\Plugin\Context\LazyContextRepository
controller.entity_form core/core.services.yml Drupal\Core\Entity\HtmlEntityFormController

Pages

Other projects