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\Plugin\PluginFormFactoryInterface core/core.services.yml
Drupal\Core\PrivateKey core/core.services.yml
Drupal\Core\Queue\QueueDatabaseFactory core/core.services.yml
Drupal\Core\Queue\QueueFactory core/core.services.yml
Drupal\Core\Queue\QueueWorkerManagerInterface core/core.services.yml
Drupal\Core\Render\BareHtmlPageRendererInterface core/core.services.yml
Drupal\Core\Render\ElementInfoManagerInterface core/core.services.yml
Drupal\Core\Render\PlaceholderGeneratorInterface core/core.services.yml
Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface core/core.services.yml
Drupal\Core\Render\RenderCacheInterface core/core.services.yml
Drupal\Core\Render\RendererInterface core/core.services.yml
Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface core/core.services.yml
Drupal\Core\Routing\AccessAwareRouterInterface core/core.services.yml
Drupal\Core\Routing\AdminContext core/core.services.yml
Drupal\Core\Routing\MatcherDumperInterface core/core.services.yml
Drupal\Core\Routing\RedirectDestinationInterface core/core.services.yml
Drupal\Core\Routing\RequestContext core/core.services.yml
Drupal\Core\Routing\RouteBuilderInterface core/core.services.yml
Drupal\Core\Routing\RouteMatchInterface core/core.services.yml
Drupal\Core\Routing\RouteProviderInterface core/core.services.yml
Drupal\Core\Routing\UrlGeneratorInterface core/core.services.yml
Drupal\Core\Session\AccessPolicyChainInterface core/core.services.yml
Drupal\Core\Session\AccountInterface core/core.services.yml
Drupal\Core\Session\AccountProxyInterface core/core.services.yml
Drupal\Core\Session\AccountSwitcherInterface core/core.services.yml
Drupal\Core\Session\MetadataBag core/core.services.yml
Drupal\Core\Session\PermissionCheckerInterface core/core.services.yml
Drupal\Core\Session\PermissionsHashGeneratorInterface core/core.services.yml
Drupal\Core\Session\SessionConfigurationInterface core/core.services.yml
Drupal\Core\Session\SessionManagerInterface core/core.services.yml
Drupal\Core\Session\SuperUserAccessPolicy core/core.services.yml
Drupal\Core\Session\UserRolesAccessPolicy core/core.services.yml
Drupal\Core\Session\WriteSafeSessionHandlerInterface core/core.services.yml
Drupal\Core\Site\MaintenanceModeInterface core/core.services.yml
Drupal\Core\Site\Settings core/core.services.yml
Drupal\Core\State\StateInterface core/core.services.yml
Drupal\Core\StreamWrapper\AssetsStream core/core.services.yml
Drupal\Core\StreamWrapper\StreamWrapperManagerInterface core/core.services.yml
Drupal\Core\StringTranslation\TranslationInterface core/core.services.yml
Drupal\Core\Template\ComponentsTwigExtension core/core.services.yml twig.extension
Drupal\Core\Template\Loader\ComponentLoader core/core.services.yml twig.loader
Drupal\Core\Template\TwigEnvironment core/core.services.yml
Drupal\Core\TempStore\PrivateTempStoreFactory core/core.services.yml
Drupal\Core\TempStore\SharedTempStoreFactory core/core.services.yml
Drupal\Core\Theme\ComponentNegotiator core/core.services.yml
Drupal\Core\Theme\ComponentPluginManager core/core.services.yml
Drupal\Core\Theme\Component\ComponentValidator core/core.services.yml
Drupal\Core\Theme\Component\SchemaCompatibilityChecker core/core.services.yml
Drupal\Core\Theme\Registry core/core.services.yml
Drupal\Core\Theme\ThemeInitializationInterface core/core.services.yml

Other projects


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