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
Drupal\Core\Theme\ThemeManagerInterface core/core.services.yml
Drupal\Core\Theme\ThemeNegotiatorInterface core/core.services.yml
Drupal\Core\TypedData\TypedDataManagerInterface core/core.services.yml
Drupal\Core\Update\UpdateHookRegistry core/core.services.yml
Drupal\Core\Utility\CallableResolver core/core.services.yml
Drupal\Core\Utility\LinkGeneratorInterface core/core.services.yml
Drupal\Core\Utility\Token core/core.services.yml
Drupal\Core\Utility\UnroutedUrlAssemblerInterface core/core.services.yml
Drupal\Core\Validation\BasicRecursiveValidatorFactory core/core.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
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

Other projects


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