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

Name File Classsort descending Tags
Drupal\Core\Locale\CountryManagerInterface core/core.services.yml
Drupal\Core\Entity\EntityAutocompleteMatcherInterface core/core.services.yml
Drupal\Core\Datetime\DateFormatterInterface core/core.services.yml
Drupal\Core\Plugin\PluginFormFactoryInterface core/core.services.yml
Drupal\Core\Theme\ThemeManagerInterface core/core.services.yml
Drupal\forum\ForumManagerInterface core/modules/forum/forum.services.yml
Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface core/core.services.yml
Drupal\forum\ForumIndexStorageInterface core/modules/forum/forum.services.yml
Drupal\Core\Theme\ThemeInitializationInterface core/core.services.yml
Drupal\Core\Block\BlockManagerInterface core/core.services.yml
Drupal\Core\Theme\Registry core/core.services.yml
Drupal\Core\Field\FieldTypePluginManagerInterface core/core.services.yml
_defaults core/modules/config/tests/config_transformer_test/config_transformer_test.services.yml
Drupal\Core\Authentication\AuthenticationProviderInterface core/core.services.yml
Drupal\Core\Authentication\AuthenticationCollectorInterface core/core.services.yml
logger.channel.user core/modules/user/user.services.yml
logger.channel.migrate_drupal core/modules/migrate_drupal/migrate_drupal.services.yml
Drupal\Core\Menu\MenuLinkManagerInterface core/core.services.yml
Drupal\Core\Session\AccountSwitcherInterface core/core.services.yml
Drupal\Core\Menu\MenuLinkTreeInterface core/core.services.yml
Drupal\Core\Session\PermissionsHashGeneratorInterface core/core.services.yml
Drupal\Core\Menu\DefaultMenuLinkTreeManipulators core/core.services.yml
Drupal\Core\Session\AccountInterface core/core.services.yml
Drupal\Core\Session\AccountProxyInterface core/core.services.yml
Drupal\autowire_test\TestInjection3 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\help\HelpTopicPluginManagerInterface core/modules/help/help.services.yml
Drupal\Core\Menu\MenuActiveTrailInterface core/core.services.yml
Drupal\autowire_test\TestInjectionInterface $testInjection3 core/modules/system/tests/modules/autowire_test/autowire_test.services.yml
Drupal\Core\Session\SessionConfigurationInterface core/core.services.yml
logger.channel.layout_builder core/modules/layout_builder/layout_builder.services.yml
Drupal\Core\Menu\MenuParentFormSelectorInterface core/core.services.yml
Drupal\Core\Template\ComponentsTwigExtension core/core.services.yml twig.extension
Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface core/modules/jsonapi/jsonapi.services.yml
Symfony\Component\HttpFoundation\Session\SessionInterface core/core.services.yml
Drupal\Core\Theme\Component\SchemaCompatibilityChecker core/core.services.yml
Drupal\jsonapi\Context\FieldResolver core/modules/jsonapi/jsonapi.services.yml
Drupal\Core\Menu\LocalActionManagerInterface core/core.services.yml
_defaults core/modules/system/tests/modules/database_test/database_test.services.yml
Drupal\Core\Theme\Component\ComponentValidator core/core.services.yml
Drupal\jsonapi\IncludeResolver core/modules/jsonapi/jsonapi.services.yml
Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface core/core.services.yml
_defaults core/modules/system/tests/modules/early_rendering_controller_test/early_rendering_controller_test.services.yml
Drupal\Core\Theme\ComponentNegotiator core/core.services.yml
Drupal\Core\Menu\LocalTaskManagerInterface core/core.services.yml
Drupal\jsonapi\Access\EntityAccessChecker core/modules/jsonapi/jsonapi.services.yml
Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface core/core.services.yml
_defaults core/modules/system/tests/modules/entity_test/entity_test.services.yml
Drupal\workspaces\WorkspaceInformationInterface core/modules/workspaces/workspaces.services.yml
Drupal\Core\Theme\ComponentPluginManager core/core.services.yml
Drupal\jsonapi\Controller\EntityResource core/modules/jsonapi/jsonapi.services.yml

Pages

Other projects