Services - 11.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
content_translation.synchronizer core/modules/content_translation/content_translation.services.yml Drupal\content_translation\FieldTranslationSynchronizer
count.jsonapi.resource_type.repository core/modules/jsonapi/tests/modules/jsonapi_test_collection_count/jsonapi_test_collection_count.services.yml Drupal\jsonapi_test_collection_count\ResourceType\CountableResourceTypeRepository
datetime.time core/modules/update/tests/modules/update_test/update_test.services.yml Drupal\update_test\Datetime\TestTime
deprecation_test.alias core/modules/system/tests/modules/deprecation_test/deprecation_test.services.yml Alias of deprecation_test.service
deprecation_test.service core/modules/system/tests/modules/deprecation_test/deprecation_test.services.yml Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass
display_variant_test.page_display_variant_subscriber core/modules/system/tests/modules/display_variant_test/display_variant_test.services.yml Drupal\display_variant_test\EventSubscriber\TestPageDisplayVariantSubscriber event_subscriber
Drupal\announcements_feed\AnnounceFetcher core/modules/announcements_feed/announcements_feed.services.yml
Drupal\announcements_feed\AnnounceRenderer core/modules/announcements_feed/announcements_feed.services.yml
Drupal\announcements_feed\LazyBuilders core/modules/announcements_feed/announcements_feed.services.yml
Drupal\autowire_test\TestInjection core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\autowire_test\TestInjection2 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\autowire_test\TestInjection3 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\autowire_test\TestInjectionInterface core/modules/system/tests/modules/autowire_test/autowire_test.services.yml Alias of Drupal\autowire_test\TestInjection
Drupal\autowire_test\TestInjectionInterface $testInjection3 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\autowire_test\TestService core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\ban\BanIpManagerInterface core/modules/ban/ban.services.yml
Drupal\big_pipe\Render\BigPipe core/modules/big_pipe/big_pipe.services.yml
Drupal\block\BlockRepositoryInterface core/modules/block/block.services.yml
Drupal\book\BookExport core/modules/book/book.services.yml
Drupal\book\BookManagerInterface core/modules/book/book.services.yml
Drupal\book\BookOutline core/modules/book/book.services.yml
Drupal\book\BookOutlineStorageInterface core/modules/book/book.services.yml
Drupal\breakpoint\BreakpointManagerInterface core/modules/breakpoint/breakpoint.services.yml
Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface core/modules/ckeditor5/ckeditor5.services.yml
Drupal\ckeditor5\SmartDefaultSettings core/modules/ckeditor5/ckeditor5.services.yml
Drupal\comment\CommentLazyBuilders core/modules/comment/comment.services.yml
Drupal\comment\CommentLinkBuilderInterface core/modules/comment/comment.services.yml
Drupal\comment\CommentManagerInterface core/modules/comment/comment.services.yml
Drupal\comment\CommentStatisticsInterface core/modules/comment/comment.services.yml
Drupal\config_translation\ConfigMapperManagerInterface core/modules/config_translation/config_translation.services.yml
Drupal\contact\MailHandlerInterface core/modules/contact/contact.services.yml
Drupal\content_moderation\ModerationInformationInterface core/modules/content_moderation/content_moderation.services.yml
Drupal\content_moderation\StateTransitionValidationInterface core/modules/content_moderation/content_moderation.services.yml
Drupal\content_translation\BundleTranslationSettingsInterface core/modules/content_translation/content_translation.services.yml
Drupal\content_translation\ContentTranslationManagerInterface core/modules/content_translation/content_translation.services.yml
Drupal\content_translation\FieldTranslationSynchronizerInterface core/modules/content_translation/content_translation.services.yml
Drupal\Core\Config\ConfigFactoryOverrideInterface core/modules/language/language.services.yml
Drupal\Core\Layout\Icon\IconBuilderInterface core/modules/layout_discovery/layout_discovery.services.yml
Drupal\Core\Layout\LayoutPluginManagerInterface core/modules/layout_discovery/layout_discovery.services.yml
Drupal\database_test\EventSubscriber\DatabaseEventSubscriber core/modules/system/tests/modules/database_test/database_test.services.yml
Drupal\destructable_test\Destructable core/modules/system/tests/modules/destructable_test/destructable_test.services.yml needs_destruction
Drupal\editor\Element core/modules/editor/editor.services.yml
Drupal\file\FileRepositoryInterface core/modules/file/file.services.yml
Drupal\file\Upload\FileUploadHandler core/modules/file/file.services.yml
Drupal\file\Upload\InputStreamFileWriterInterface core/modules/file/file.services.yml
Drupal\file\Validation\FileValidatorInterface core/modules/file/file.services.yml
Drupal\file\Validation\RecursiveValidatorFactory core/modules/file/file.services.yml
Drupal\forum\ForumIndexStorageInterface core/modules/forum/forum.services.yml
Drupal\forum\ForumManagerInterface core/modules/forum/forum.services.yml
Drupal\help\HelpTopicPluginManagerInterface core/modules/help/help.services.yml

Other projects


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