Services - 8.9.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 893

Title File name Summary All service tags
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.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\ContentEntityNormalizer 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
serializer.normalizer.entity_reference_item.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\EntityReferenceItemNormalizer normalizer
serializer.normalizer.field.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\FieldNormalizer normalizer
serializer.normalizer.field.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\FieldNormalizer jsonapi_normalizer
serializer.normalizer.field_item.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\FieldItemNormalizer normalizer
serializer.normalizer.field_item.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\FieldItemNormalizer jsonapi_normalizer
serializer.normalizer.file_entity.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\FileEntityNormalizer normalizer
serializer.normalizer.http_exception.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\HttpExceptionNormalizer jsonapi_normalizer
serializer.normalizer.htt_exception.jsonapi core/modules/jsonapi/jsonapi.services.yml Alias of serializer.normalizer.http_exception.jsonapi
serializer.normalizer.jsonapi_document_toplevel.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer jsonapi_normalizer
serializer.normalizer.link_collection.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\LinkCollectionNormalizer jsonapi_normalizer
serializer.normalizer.list core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\ListNormalizer normalizer
serializer.normalizer.password_field_item core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\NullNormalizer normalizer
serializer.normalizer.primitive_data core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\PrimitiveDataNormalizer normalizer
serializer.normalizer.relationship.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\RelationshipNormalizer jsonapi_normalizer
serializer.normalizer.resource_identifier.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\ResourceIdentifierNormalizer jsonapi_normalizer
serializer.normalizer.resource_object.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\ResourceObjectNormalizer jsonapi_normalizer
serializer.normalizer.safe_string core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\MarkupNormalizer normalizer
serializer.normalizer.serialization_test core/modules/serialization/tests/serialization_test/serialization_test.services.yml Drupal\serialization_test\SerializationTestNormalizer normalizer
serializer.normalizer.silly_fielditem core/modules/serialization/tests/modules/field_normalization_test/field_normalization_test.services.yml Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer normalizer
serializer.normalizer.string.jsonapi_test_data_type core/modules/jsonapi/tests/modules/jsonapi_test_data_type/jsonapi_test_data_type.services.yml Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer normalizer
serializer.normalizer.string.jsonapi_test_field_type core/modules/jsonapi/tests/modules/jsonapi_test_field_type/jsonapi_test_field_type.services.yml Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer normalizer
serializer.normalizer.timestamp core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\TimestampNormalizer normalizer
serializer.normalizer.timestamp_item core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\TimestampItemNormalizer normalizer
serializer.normalizer.timestamp_item.hal core/modules/hal/hal.services.yml Drupal\hal\Normalizer\TimestampItemNormalizer normalizer
serializer.normalizer.traversable_object.jsonapi_test_data_type core/modules/jsonapi/tests/modules/jsonapi_test_data_type/jsonapi_test_data_type.services.yml Drupal\jsonapi_test_data_type\Normalizer\TraversableObjectNormalizer normalizer
serializer.normalizer.typed_data core/modules/serialization/serialization.services.yml Drupal\serialization\Normalizer\TypedDataNormalizer normalizer
serializer.normalizer.unprocessable_entity_exception.jsonapi core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Normalizer\UnprocessableHttpEntityExceptionNormalizer jsonapi_normalizer
service_provider_test_class core/modules/system/tests/modules/service_provider_test/service_provider_test.services.yml Drupal\service_provider_test\TestClass event_subscriber, needs_destruction
session core/core.services.yml Symfony\Component\HttpFoundation\Session\Session service_collector
session.attribute_bag core/core.services.yml Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
session.flash_bag core/core.services.yml Symfony\Component\HttpFoundation\Session\Flash\FlashBag
session_configuration core/core.services.yml Drupal\Core\Session\SessionConfiguration
session_handler core/core.services.yml Alias of session_handler.storage
session_handler.storage core/core.services.yml Drupal\Core\Session\SessionHandler backend_overridable
session_handler.write_safe core/core.services.yml Drupal\Core\Session\WriteSafeSessionHandler session_handler_proxy
session_manager core/core.services.yml Drupal\Core\Session\SessionManager backend_overridable
session_manager.metadata_bag core/core.services.yml Drupal\Core\Session\MetadataBag
session_test.session_bag core/modules/system/tests/modules/session_test/session_test.services.yml Drupal\session_test\Session\TestSessionBag session_bag
session_test.session_handler.test_proxy core/modules/system/tests/modules/session_test/session_test.services.yml Drupal\session_test\Session\TestSessionHandlerProxy session_handler_proxy
session_test.session_handler.test_proxy2 core/modules/system/tests/modules/session_test/session_test.services.yml Drupal\session_test\Session\TestSessionHandlerProxy session_handler_proxy
session_test.session_handler_proxy_trace core/modules/system/tests/modules/session_test/session_test.services.yml ArrayObject

Other projects


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