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

Namesort ascending File Class Tags
serializer.entity_resolver.uuid core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\UuidResolver entity_resolver
serializer.entity_resolver core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\ChainEntityResolver
serializer.encoder.xml core/modules/serialization/serialization.services.yml Drupal\serialization\Encoder\XmlEncoder encoder
serializer.encoder.serialization_test core/modules/serialization/tests/serialization_test/serialization_test.services.yml Drupal\serialization_test\SerializationTestEncoder encoder
serializer.encoder.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Encoder\JsonEncoder jsonapi_encoder
serializer.encoder.json core/modules/serialization/serialization.services.yml Drupal\serialization\Encoder\JsonEncoder encoder
serializer core/modules/serialization/serialization.services.yml Symfony\Component\Serializer\Serializer
serialization.yaml core/core.services.yml Drupal\Component\Serialization\Yaml
serialization.user_route_alter_subscriber core/modules/serialization/serialization.services.yml Drupal\serialization\EventSubscriber\UserRouteAlterSubscriber
serialization.phpserialize core/core.services.yml Drupal\Component\Serialization\PhpSerialize
serialization.normalizer.field_item core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\FieldItemNormalizer normalizer
serialization.normalizer.field core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\FieldNormalizer normalizer
serialization.json core/core.services.yml Drupal\Component\Serialization\Json
serialization.exception.default core/modules/serialization/serialization.services.yml Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber
serialization.entity_resolver.target_id core/modules/serialization/serialization.services.yml Drupal\serialization\EntityResolver\TargetIdResolver entity_resolver
search.text_processor core/modules/search/search.services.yml Drupal\search\SearchTextProcessor
search.search_page_repository core/modules/search/search.services.yml Drupal\search\SearchPageRepository
search.index core/modules/search/search.services.yml Drupal\search\SearchIndex backend_overridable
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
route_subscriber.no_big_pipe core/modules/big_pipe/big_pipe.services.yml Drupal\big_pipe\EventSubscriber\NoBigPipeRouteAlterSubscriber
route_subscriber.module core/core.services.yml Drupal\Core\EventSubscriber\ModuleRouteSubscriber
route_subscriber.entity core/core.services.yml Drupal\Core\EventSubscriber\EntityRouteAlterSubscriber
route_special_attributes_subscriber core/core.services.yml Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber
route_processor_manager core/core.services.yml Drupal\Core\RouteProcessor\RouteProcessorManager service_collector
route_processor_current core/core.services.yml Drupal\Core\RouteProcessor\RouteProcessorCurrent route_processor_outbound
route_processor_csrf core/core.services.yml Drupal\Core\Access\RouteProcessorCsrf route_processor_outbound
route_http_method_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RouteMethodSubscriber
route_enhancer.param_conversion core/core.services.yml Drupal\Core\Routing\Enhancer\ParamConversionEnhancer route_enhancer
route_enhancer.form core/core.services.yml Drupal\Core\Routing\Enhancer\FormRouteEnhancer route_enhancer
route_enhancer.entity_revision core/core.services.yml Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer route_enhancer
route_enhancer.entity_bundle core/core.services.yml Drupal\Core\Entity\Enhancer\EntityBundleRouteEnhancer route_enhancer
route_enhancer.entity core/core.services.yml Drupal\Core\Entity\Enhancer\EntityRouteEnhancer route_enhancer
route_access_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RouteAccessResponseSubscriber
router_listener core/core.services.yml Symfony\Component\HttpKernel\EventListener\RouterListener
router.route_provider.lazy_builder core/core.services.yml Drupal\Core\Routing\RouteProviderLazyBuilder
router.route_provider core/core.services.yml Drupal\Core\Routing\RouteProvider backend_overridable
router.route_preloader core/core.services.yml Drupal\Core\Routing\RoutePreloader
router.request_context core/core.services.yml Drupal\Core\Routing\RequestContext persist
router.path_roots_subscriber core/core.services.yml Drupal\Core\EventSubscriber\PathRootsSubscriber
router.no_access_checks core/core.services.yml \Drupal\Core\Routing\Router service_collector
router.dumper core/core.services.yml Drupal\Core\Routing\MatcherDumper backend_overridable
router.builder core/core.services.yml Drupal\Core\Routing\RouteBuilder needs_destruction
router.admin_context core/core.services.yml Drupal\Core\Routing\AdminContext
router core/core.services.yml Drupal\Core\Routing\AccessAwareRouter
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
rest_test.encoder.foobar core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\serialization\Encoder\JsonEncoder encoder
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.authentication.test_auth core/modules/rest/tests/modules/rest_test/rest_test.services.yml Drupal\rest_test\Authentication\Provider\TestAuth authentication_provider
rest.resource_routes core/modules/rest/rest.services.yml Drupal\rest\Routing\ResourceRoutes
rest.resource_response.subscriber core/modules/rest/rest.services.yml Drupal\rest\EventSubscriber\ResourceResponseSubscriber

Pages

Other projects