Services - 11.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.exposed_form core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
plugin.manager.views.field core/modules/views/views.services.yml Drupal\views\Plugin\ViewsHandlerManager
plugin.manager.views.filter core/modules/views/views.services.yml Drupal\views\Plugin\ViewsHandlerManager
plugin.manager.views.join core/modules/views/views.services.yml Drupal\views\Plugin\ViewsHandlerManager
plugin.manager.views.pager core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
plugin.manager.views.query core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
plugin.manager.views.relationship core/modules/views/views.services.yml Drupal\views\Plugin\ViewsHandlerManager
plugin.manager.views.row core/modules/views/views.services.yml Drupal\views\Plugin\ViewsPluginManager
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
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
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
route_subscriber.no_big_pipe core/modules/big_pipe/big_pipe.services.yml Drupal\big_pipe\EventSubscriber\NoBigPipeRouteAlterSubscriber
sdc_other_node_visitor.twig.extension.profiler core/modules/system/tests/modules/sdc_other_node_visitor/sdc_other_node_visitor.services.yml Drupal\sdc_other_node_visitor\Twig\Extension\TestProfilerExtension twig.extension
sdc_other_node_visitor.twig.extension.profiler core/modules/sdc/tests/modules/sdc_other_node_visitor/sdc_other_node_visitor.services.yml Drupal\sdc_other_node_visitor\Twig\Extension\TestProfilerExtension twig.extension
search.index core/modules/search/search.services.yml Drupal\search\SearchIndex backend_overridable
search.search_page_repository core/modules/search/search.services.yml Drupal\search\SearchPageRepository
search.text_processor core/modules/search/search.services.yml Drupal\search\SearchTextProcessor
serialization.entity_resolver.target_id core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\TargetIdResolver entity_resolver
serialization.exception.default core/modules/serialization/serialization.services.yml Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber
serialization.normalizer.field core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\FieldNormalizer normalizer
serialization.normalizer.field_item core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\FieldItemNormalizer normalizer
serialization.user_route_alter_subscriber core/modules/serialization/serialization.services.yml Drupal\serialization\EventSubscriber\UserRouteAlterSubscriber
serializer core/modules/serialization/serialization.services.yml Symfony\Component\Serializer\Serializer
serializer.encoder.json core/modules/serialization/serialization.services.yml Drupal\serialization\Encoder\JsonEncoder encoder
serializer.encoder.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Encoder\JsonEncoder jsonapi_encoder
serializer.encoder.serialization_test core/modules/serialization/tests/serialization_test/serialization_test.services.yml Drupal\serialization_test\SerializationTestEncoder encoder
serializer.encoder.xml core/modules/serialization/serialization.services.yml Drupal\serialization\Encoder\XmlEncoder encoder
serializer.entity_resolver core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\ChainEntityResolver
serializer.entity_resolver.uuid core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\UuidResolver entity_resolver
serializer.normalizer.boolean.datatype.emoji core/modules/serialization/tests/modules/test_datatype_boolean_emoji_normalizer/test_datatype_boolean_emoji_normalizer.services.yml Drupal\test_datatype_boolean_emoji_normalizer\Normalizer\BooleanNormalizer normalizer
serializer.normalizer.boolean.fieldtype.emoji core/modules/serialization/tests/modules/test_fieldtype_boolean_emoji_normalizer/test_fieldtype_boolean_emoji_normalizer.services.yml Drupal\test_fieldtype_boolean_emoji_normalizer\Normalizer\BooleanItemNormalizer normalizer
serializer.normalizer.complex_data core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\ComplexDataNormalizer normalizer
serializer.normalizer.config_entity core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\ConfigEntityNormalizer normalizer
serializer.normalizer.config_entity.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\ConfigEntityDenormalizer jsonapi_normalizer
serializer.normalizer.content_entity core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\ContentEntityNormalizer normalizer
serializer.normalizer.content_entity.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\ContentEntityDenormalizer jsonapi_normalizer
serializer.normalizer.data.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\DataNormalizer jsonapi_normalizer
serializer.normalizer.datetimeiso8601 core/modules/serialization/serialization.services.yml \Drupal\serialization\Normalizer\DateTimeIso8601Normalizer normalizer
serializer.normalizer.entity core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\EntityNormalizer normalizer
serializer.normalizer.entity_access_exception.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\EntityAccessDeniedHttpExceptionNormalizer jsonapi_normalizer
serializer.normalizer.entity_reference_field_item core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer normalizer

Other projects


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