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 ascending File Class Tags
_defaults core/modules/media/media.services.yml
_defaults core/modules/media_library/media_library.services.yml
_defaults core/modules/migrate/migrate.services.yml
_defaults core/modules/node/node.services.yml
_defaults core/modules/path_alias/path_alias.services.yml
_defaults core/modules/config/tests/config_collection_install_test/config_collection_install_test.services.yml
_defaults core/modules/sdc/sdc.services.yml
_defaults core/modules/config/tests/config_events_test/config_events_test.services.yml
_defaults core/modules/rest/rest.services.yml
_defaults core/modules/config/tests/config_import_test/config_import_test.services.yml
_defaults core/modules/config/tests/config_transformer_test/config_transformer_test.services.yml
_defaults core/modules/layout_builder/tests/modules/layout_builder_element_test/layout_builder_element_test.services.yml
_defaults core/modules/serialization/serialization.services.yml
_defaults core/modules/system/system.services.yml
_defaults core/modules/user/user.services.yml
_defaults core/modules/views/views.services.yml
_defaults core/modules/media/tests/modules/media_test_embed/media_test_embed.services.yml
_defaults core/modules/workspaces/workspaces.services.yml
_defaults core/modules/file/tests/modules/file_validator_test/file_validator_test.services.yml
_defaults core/core.services.yml
_defaults core/modules/automated_cron/automated_cron.services.yml
_defaults core/modules/big_pipe/big_pipe.services.yml
_defaults core/modules/block/block.services.yml
_defaults core/modules/block_content/block_content.services.yml
_defaults core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml f, bar.tag2, bar.tag3
_defaults core/modules/ckeditor5/ckeditor5.services.yml
_defaults core/modules/config/config.services.yml
_defaults core/modules/config_translation/config_translation.services.yml
_defaults core/modules/content_moderation/content_moderation.services.yml
_defaults core/modules/content_translation/content_translation.services.yml
_defaults core/modules/dynamic_page_cache/dynamic_page_cache.services.yml
_defaults core/modules/editor/editor.services.yml
_defaults core/modules/big_pipe/tests/modules/big_pipe_test/big_pipe_test.services.yml
_defaults core/modules/field_ui/field_ui.services.yml
_defaults core/modules/file/file.services.yml
_defaults core/modules/jsonapi/jsonapi.services.yml
_defaults core/modules/system/tests/modules/database_test/database_test.services.yml
_defaults core/modules/system/tests/modules/early_rendering_controller_test/early_rendering_controller_test.services.yml
_defaults core/modules/system/tests/modules/entity_test/entity_test.services.yml
_defaults core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml
_defaults core/modules/system/tests/modules/form_test/form_test.services.yml
_defaults core/modules/system/tests/modules/hold_test/hold_test.services.yml
_defaults core/modules/language/language.services.yml
_defaults core/modules/system/tests/modules/module_install_class_loader_test1/module_install_class_loader_test1.services.yml
_defaults core/modules/system/tests/modules/module_install_class_loader_test2/module_install_class_loader_test2.services.yml
_defaults core/modules/layout_builder/layout_builder.services.yml
_defaults core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml
_defaults core/modules/system/tests/modules/session_test/session_test.services.yml
_defaults core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.services.yml
_defaults core/modules/system/tests/modules/theme_test/theme_test.services.yml

Pages

Other projects