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\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\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 Alias of Drupal\Core\Theme\ComponentNegotiator
Drupal\sdc\Component\ComponentValidator core/modules/sdc/sdc.services.yml Alias of Drupal\Core\Theme\Component\ComponentValidator
Drupal\sdc\Component\SchemaCompatibilityChecker core/modules/sdc/sdc.services.yml Alias of Drupal\Core\Theme\Component\SchemaCompatibilityChecker
Drupal\sdc\Twig\TwigComponentLoader core/modules/sdc/sdc.services.yml Alias of Drupal\Core\Template\Loader\ComponentLoader
Drupal\sdc\Twig\TwigExtension core/modules/sdc/sdc.services.yml Alias of Drupal\Core\Template\ComponentsTwigExtension
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
Drupal\serialization\EntityResolver\ChainEntityResolverInterface core/modules/serialization/serialization.services.yml
Drupal\services_defaults_test\TestInjection core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
Drupal\services_defaults_test\TestInjection2 core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml zee.bang, bar.tag2
Drupal\services_defaults_test\TestInjectionInterface core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
Drupal\services_defaults_test\TestPrivateService core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
Drupal\services_defaults_test\TestService core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml
Drupal\shortcut\ShortcutLazyBuilders core/modules/shortcut/shortcut.services.yml
Drupal\statistics\StatisticsStorageInterface core/modules/statistics/statistics.services.yml
Drupal\system\ModuleAdminLinksHelper core/modules/system/system.services.yml
Drupal\system\Routing\MenuLinksetRoutes core/modules/system/system.services.yml
Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher core/modules/system/system.services.yml
Drupal\system\SystemManager core/modules/system/system.services.yml
Drupal\update\UpdateFetcherInterface core/modules/update/update.services.yml
Drupal\update\UpdateManagerInterface core/modules/update/update.services.yml
Drupal\update\UpdateProcessorInterface core/modules/update/update.services.yml
Drupal\user\ModulePermissionsLinkHelper core/modules/user/user.services.yml
Drupal\user\PermissionHandlerInterface core/modules/user/user.services.yml
Drupal\user\ToolbarLinkBuilder core/modules/user/user.services.yml
Drupal\user\UserAuthInterface core/modules/user/user.services.yml
Drupal\user\UserDataInterface core/modules/user/user.services.yml
Drupal\user\UserFloodControlInterface core/modules/user/user.services.yml
Drupal\user\UserNameValidator core/modules/user/user.services.yml
Drupal\user_route_alter_test\Routing\RouteSubscriber core/modules/serialization/tests/modules/user_route_alter_test/user_route_alter_test.services.yml
Drupal\views\Analyzer core/modules/views/views.services.yml
Drupal\views\ExposedFormCache core/modules/views/views.services.yml
Drupal\views\ViewExecutableFactory core/modules/views/views.services.yml
Drupal\views\ViewsData core/modules/views/views.services.yml
Drupal\views\ViewsDataHelper core/modules/views/views.services.yml
Drupal\workspaces\Controller\WorkspacesHtmlEntityFormController core/modules/workspaces/workspaces.services.yml
Drupal\workspaces\WorkspaceAssociationInterface core/modules/workspaces/workspaces.services.yml
Drupal\workspaces\WorkspaceInformationInterface core/modules/workspaces/workspaces.services.yml

Other projects


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