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
plugin.manager.views.sort core/modules/views/views.services.yml Drupal\views\Plugin\ViewsHandlerManager
plugin.manager.views.style core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
plugin.manager.views.wizard core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
plugin.manager.workflows.type core/modules/workflows/workflows.services.yml Drupal\workflows\WorkflowTypeManager plugin_manager_cache_clear
plugin_form.factory core/core.services.yml Drupal\Core\Plugin\PluginFormFactory
private_key core/core.services.yml Drupal\Core\PrivateKey
psr17.response_factory core/core.services.yml GuzzleHttp\Psr7\HttpFactory
psr17.server_request_factory core/core.services.yml GuzzleHttp\Psr7\HttpFactory
psr17.stream_factory core/core.services.yml GuzzleHttp\Psr7\HttpFactory
psr17.uploaded_file_factory core/core.services.yml GuzzleHttp\Psr7\HttpFactory
psr7.http_foundation_factory core/core.services.yml Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory
psr7.http_message_factory core/core.services.yml Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory
Psr\EventDispatcher\EventDispatcherInterface core/core.services.yml
Psr\Http\Client\ClientInterface core/core.services.yml
Psr\Http\Message\ResponseFactoryInterface core/core.services.yml
Psr\Http\Message\ServerRequestFactoryInterface core/core.services.yml
Psr\Http\Message\StreamFactoryInterface core/core.services.yml
Psr\Http\Message\UploadedFileFactoryInterface core/core.services.yml
psr_response_view_subscriber core/core.services.yml Drupal\Core\EventSubscriber\PsrResponseSubscriber
queue core/core.services.yml Drupal\Core\Queue\QueueFactory
queue.database core/core.services.yml Drupal\Core\Queue\QueueDatabaseFactory
redirect.destination core/core.services.yml Drupal\Core\Routing\RedirectDestination
redirect_leading_slashes_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RedirectLeadingSlashesSubscriber
redirect_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RedirectResponseSubscriber
renderer core/core.services.yml Drupal\Core\Render\Renderer
renderer_non_html core/core.services.yml Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber
render_cache core/core.services.yml Drupal\Core\Render\PlaceholderingRenderCache
render_placeholder_generator core/core.services.yml Drupal\Core\Render\PlaceholderGenerator
render_placeholder_message_test.controller core/modules/system/tests/modules/render_placeholder_message_test/render_placeholder_message_test.services.yml Drupal\render_placeholder_message_test\RenderPlaceholderMessageTestController
request_format_route_filter core/core.services.yml Drupal\Core\Routing\RequestFormatRouteFilter route_filter
request_stack core/core.services.yml Symfony\Component\HttpFoundation\RequestStack persist
required_module_uninstall_validator core/core.services.yml Drupal\Core\Extension\RequiredModuleUninstallValidator module_install.uninstall_validator
resolver_manager.entity core/core.services.yml Drupal\Core\Entity\EntityResolverManager
response_filter.active_link core/core.services.yml Drupal\Core\EventSubscriber\ActiveLinkResponseFilter
response_filter.rss.relative_url core/core.services.yml Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter
response_generator_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ResponseGeneratorSubscriber
rest.resource.entity.post_route.subscriber core/modules/rest/rest.services.yml \Drupal\rest\EventSubscriber\EntityResourcePostRouteSubscriber
rest.resource_response.subscriber core/modules/rest/rest.services.yml Drupal\rest\EventSubscriber\ResourceResponseSubscriber
rest.resource_routes core/modules/rest/rest.services.yml Drupal\rest\Routing\ResourceRoutes
rest_test.authentication.test_auth core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\rest_test\Authentication\Provider\TestAuth authentication_provider
rest_test.authentication.test_auth_global core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\rest_test\Authentication\Provider\TestAuthGlobal authentication_provider
rest_test.encoder.foobar core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\serialization\Encoder\JsonEncoder encoder
rest_test.page_cache_request_policy.deny_test_auth_requests core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\rest_test\PageCache\RequestPolicy\DenyTestAuthRequests page_cache_request_policy
router core/core.services.yml Drupal\Core\Routing\AccessAwareRouter
router.admin_context core/core.services.yml Drupal\Core\Routing\AdminContext
router.builder core/core.services.yml Drupal\Core\Routing\RouteBuilder needs_destruction
router.dumper core/core.services.yml Drupal\Core\Routing\MatcherDumper backend_overridable
router.no_access_checks core/core.services.yml \Drupal\Core\Routing\Router service_collector
router.path_roots_subscriber core/core.services.yml Drupal\Core\EventSubscriber\PathRootsSubscriber
router.request_context core/core.services.yml Drupal\Core\Routing\RequestContext persist

Other projects


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