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
Drupal\jsonapi\Access\EntityAccessChecker core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\Context\FieldResolver core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\Controller\EntityResource core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\Controller\FileUpload core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\IncludeResolver core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface core/modules/jsonapi/jsonapi.services.yml
Drupal\jsonapi\Revisions\VersionNegotiator core/modules/jsonapi/jsonapi.services.yml
Drupal\language\Config\LanguageConfigFactoryOverrideInterface core/modules/language/language.services.yml
Drupal\language\LanguageNegotiatorInterface core/modules/language/language.services.yml
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController core/modules/layout_builder/layout_builder.services.yml
Drupal\layout_builder\Entity\SampleEntityGeneratorInterface core/modules/layout_builder/layout_builder.services.yml
Drupal\layout_builder\InlineBlockUsageInterface core/modules/layout_builder/layout_builder.services.yml
Drupal\layout_builder\LayoutTempstoreRepositoryInterface core/modules/layout_builder/layout_builder.services.yml
Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface core/modules/layout_builder/layout_builder.services.yml
Drupal\locale\LocaleConfigManager core/modules/locale/locale.services.yml
Drupal\locale\LocaleDefaultConfigStorage core/modules/locale/locale.services.yml
Drupal\locale\LocaleProjectStorageInterface core/modules/locale/locale.services.yml
Drupal\locale\PluralFormulaInterface core/modules/locale/locale.services.yml
Drupal\locale\StringStorageInterface core/modules/locale/locale.services.yml
Drupal\media\IFrameUrlHelper core/modules/media/media.services.yml
Drupal\media\OEmbed\ProviderRepositoryInterface core/modules/media/media.services.yml
Drupal\media\OEmbed\ResourceFetcherInterface core/modules/media/media.services.yml
Drupal\media\OEmbed\UrlResolverInterface core/modules/media/media.services.yml
Drupal\media_library\MediaLibraryUiBuilder core/modules/media_library/media_library.services.yml
Drupal\media_library\OpenerResolverInterface core/modules/media_library/media_library.services.yml
Drupal\menu_ui\Menu\MenuUiMenuTreeManipulators core/modules/menu_ui/menu_ui.services.yml
Drupal\migrate\MigrateBuildDependencyInterface core/modules/migrate/migrate.services.yml
Drupal\migrate\MigrateLookupInterface core/modules/migrate/migrate.services.yml
Drupal\migrate\MigrateStubInterface core/modules/migrate/migrate.services.yml
Drupal\migrate\Plugin\MigrationPluginManagerInterface core/modules/migrate/migrate.services.yml
Drupal\migrate_drupal\FieldDiscoveryInterface core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\migrate_drupal\MigrationState core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\navigation\NavigationRenderer core/modules/navigation/navigation.services.yml
Drupal\navigation\UserLazyBuilders core/modules/navigation/navigation.services.yml
Drupal\node\NodeGrantDatabaseStorageInterface core/modules/node/node.services.yml
Drupal\path_alias\AliasManagerInterface core/modules/path_alias/path_alias.services.yml
Drupal\path_alias\AliasPrefixListInterface core/modules/path_alias/path_alias.services.yml
Drupal\path_alias\AliasRepositoryInterface core/modules/path_alias/path_alias.services.yml
Drupal\path_alias\AliasWhitelistInterface core/modules/path_alias/path_alias.services.yml
Drupal\performance_test\DatabaseEventEnabler core/modules/system/tests/modules/performance_test/performance_test.services.yml http_middleware
Drupal\performance_test\PerformanceDataCollector core/modules/system/tests/modules/performance_test/performance_test.services.yml event_subscriber, needs_destruction
Drupal\sdc\ComponentNegotiator core/modules/sdc/sdc.services.yml
Drupal\sdc\Component\ComponentValidator core/modules/sdc/sdc.services.yml
Drupal\sdc\Component\SchemaCompatibilityChecker core/modules/sdc/sdc.services.yml
Drupal\sdc\Twig\TwigComponentLoader core/modules/sdc/sdc.services.yml twig.loader
Drupal\sdc\Twig\TwigExtension core/modules/sdc/sdc.services.yml twig.extension
Drupal\search\SearchIndexInterface core/modules/search/search.services.yml
Drupal\search\SearchPageRepositoryInterface core/modules/search/search.services.yml
Drupal\search\SearchTextProcessorInterface core/modules/search/search.services.yml

Other projects


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