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

Name Filesort descending Class Tags
form_builder core/core.services.yml Drupal\Core\Form\FormBuilder
Drupal\Core\Entity\EntityResolverManager core/core.services.yml
Drupal\Core\Form\FormBuilderInterface core/core.services.yml
route_subscriber.entity core/core.services.yml Drupal\Core\EventSubscriber\EntityRouteAlterSubscriber
form_validator core/core.services.yml Drupal\Core\Form\FormValidator
ajax_response.subscriber core/core.services.yml Drupal\Core\EventSubscriber\AjaxResponseSubscriber
Drupal\Core\Form\FormValidatorInterface core/core.services.yml
form_ajax_subscriber core/core.services.yml Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber
form_submitter core/core.services.yml Drupal\Core\Form\FormSubmitter
route_enhancer.param_conversion core/core.services.yml Drupal\Core\Routing\Enhancer\ParamConversionEnhancer route_enhancer
Drupal\Core\Form\FormSubmitterInterface core/core.services.yml
route_enhancer.form core/core.services.yml Drupal\Core\Routing\Enhancer\FormRouteEnhancer route_enhancer
form_error_handler core/core.services.yml Drupal\Core\Form\FormErrorHandler
route_enhancer.entity core/core.services.yml Drupal\Core\Entity\Enhancer\EntityRouteEnhancer route_enhancer
Drupal\Core\Form\FormErrorHandlerInterface core/core.services.yml
route_enhancer.entity_bundle core/core.services.yml Drupal\Core\Entity\Enhancer\EntityBundleRouteEnhancer route_enhancer
form_cache core/core.services.yml Drupal\Core\Form\FormCache
route_enhancer.entity_revision core/core.services.yml Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer route_enhancer
_defaults core/core.services.yml
Drupal\Core\Form\FormCacheInterface core/core.services.yml
route_special_attributes_subscriber core/core.services.yml Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber
variation_cache_factory core/core.services.yml Drupal\Core\Cache\VariationCacheFactory
keyvalue core/core.services.yml Drupal\Core\KeyValueStore\KeyValueFactory
route_http_method_subscriber core/core.services.yml Drupal\Core\EventSubscriber\RouteMethodSubscriber
Drupal\Core\Cache\VariationCacheFactory core/core.services.yml
keyvalue.database core/core.services.yml Drupal\Core\KeyValueStore\KeyValueDatabaseFactory
psr_response_view_subscriber core/core.services.yml Drupal\Core\EventSubscriber\PsrResponseSubscriber
cache.backend.memory.memory core/core.services.yml Drupal\Core\Cache\MemoryCache\MemoryCacheFactory
keyvalue.expirable core/core.services.yml Drupal\Core\KeyValueStore\KeyValueExpirableFactory
main_content_view_subscriber core/core.services.yml Drupal\Core\EventSubscriber\MainContentViewSubscriber
cache.access_policy core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin
keyvalue.expirable.database core/core.services.yml Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
renderer_non_html core/core.services.yml Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber
access_policy.super_user core/core.services.yml Drupal\Core\Session\SuperUserAccessPolicy access_policy
cache.access_policy_memory core/core.services.yml Drupal\Core\Cache\CacheBackendInterface cache.bin.memory
logger.factory core/core.services.yml Drupal\Core\Logger\LoggerChannelFactory service_collector
main_content_renderer.html core/core.services.yml Drupal\Core\Render\MainContent\HtmlRenderer render.main_content_renderer
Drupal\Core\Session\SuperUserAccessPolicy core/core.services.yml
variation_cache.access_policy core/core.services.yml Drupal\Core\Cache\VariationCacheInterface
Drupal\Core\Logger\LoggerChannelFactoryInterface core/core.services.yml
main_content_renderer.ajax core/core.services.yml Drupal\Core\Render\MainContent\AjaxRenderer render.main_content_renderer
access_policy.user_roles core/core.services.yml Drupal\Core\Session\UserRolesAccessPolicy access_policy
variation_cache.access_policy_memory core/core.services.yml Drupal\Core\Cache\VariationCacheInterface
logger.channel_base core/core.services.yml Drupal\Core\Logger\LoggerChannel
main_content_renderer.dialog core/core.services.yml Drupal\Core\Render\MainContent\DialogRenderer render.main_content_renderer
Drupal\Core\Session\UserRolesAccessPolicy core/core.services.yml
Drupal\Core\Asset\AssetQueryStringInterface core/core.services.yml
logger.channel.default core/core.services.yml
main_content_renderer.off_canvas core/core.services.yml Drupal\Core\Render\MainContent\OffCanvasRenderer render.main_content_renderer
asset.query_string core/core.services.yml Drupal\Core\Asset\AssetQueryString

Pages

Other projects