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
user_access_denied_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\AccessDeniedSubscriber
user_auth_decorator.user.auth core/modules/user/tests/modules/user_auth_decorator_test/user_auth_decorator_test.services.yml \Drupal\user_auth_decorator_test\UserAuthDecorator
user_last_access_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\UserRequestSubscriber
user_maintenance_mode_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\MaintenanceModeSubscriber
user_permissions_hash_generator core/core.services.yml Drupal\Core\Session\PermissionsHashGenerator
uuid core/core.services.yml Drupal\Component\Uuid\Php
validation.basic_recursive_validator_factory core/core.services.yml Drupal\Core\Validation\BasicRecursiveValidatorFactory
validation.constraint core/core.services.yml Drupal\Core\Validation\ConstraintManager plugin_manager_cache_clear
variation_cache.access_policy core/core.services.yml Drupal\Core\Cache\VariationCacheInterface
variation_cache.access_policy_memory core/core.services.yml Drupal\Core\Cache\VariationCacheInterface
variation_cache.dynamic_page_cache core/modules/dynamic_page_cache/dynamic_page_cache.services.yml Drupal\Core\Cache\VariationCacheInterface
variation_cache.jsonapi_normalizations core/modules/jsonapi/jsonapi.services.yml Drupal\Core\Cache\VariationCacheInterface
variation_cache_factory core/core.services.yml Drupal\Core\Cache\VariationCacheFactory
views.analyzer core/modules/views/views.services.yml Drupal\views\Analyzer
views.cast_sql core/modules/views/views.services.yml Drupal\views\Plugin\views\query\CastSql backend_overridable
views.date_sql core/modules/views/views.services.yml Drupal\views\Plugin\views\query\MysqlDateSql backend_overridable
views.entity_schema_subscriber core/modules/views/views.services.yml Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber
views.executable core/modules/views/views.services.yml Drupal\views\ViewExecutableFactory
views.exposed_form_cache core/modules/views/views.services.yml Drupal\views\ExposedFormCache
views.route_subscriber core/modules/views/views.services.yml Drupal\views\EventSubscriber\RouteSubscriber
views.views_data core/modules/views/views.services.yml Drupal\views\ViewsData backend_overridable
views.views_data_helper core/modules/views/views.services.yml Drupal\views\ViewsDataHelper
workflows.access_check.extended_permissions core/modules/workflows/workflows.services.yml Drupal\workflows\WorkflowStateTransitionOperationsAccessCheck access_check
workspaces.association core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceAssociation backend_overridable
workspaces.controller.entity_form core/modules/workspaces/workspaces.services.yml Drupal\workspaces\Controller\WorkspacesHtmlEntityFormController
workspaces.entity.query.sql core/modules/workspaces/workspaces.services.yml Drupal\workspaces\EntityQuery\QueryFactory backend_overridable
workspaces.entity_schema_listener core/modules/workspaces/workspaces.services.yml Drupal\workspaces\EventSubscriber\EntitySchemaSubscriber
workspaces.information core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceInformation
workspaces.lazy_builders core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspacesLazyBuilders
workspaces.manager core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceManager service_id_collector
workspaces.menu.tree_storage core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspacesMenuTreeStorage backend_overridable
workspaces.negotiator.query_parameter core/modules/workspaces/workspaces.services.yml Drupal\workspaces\Negotiator\QueryParameterWorkspaceNegotiator workspace_negotiator
workspaces.negotiator.session core/modules/workspaces/workspaces.services.yml Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator workspace_negotiator
workspaces.operation_factory core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceOperationFactory
workspaces.repository core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceRepository
workspaces.workspace_subscriber core/modules/workspaces/workspaces.services.yml Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber
workspace_update_test.negotiator.test core/modules/workspaces/tests/modules/workspace_update_test/workspace_update_test.services.yml Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator workspace_negotiator
_defaults core/modules/media/media.services.yml
_defaults core/modules/media/tests/modules/media_test_embed/media_test_embed.services.yml
_defaults core/modules/file/file.services.yml
_defaults core/modules/file/tests/modules/file_validator_test/file_validator_test.services.yml
_defaults core/modules/locale/locale.services.yml
_defaults core/modules/language/language.services.yml
_defaults core/modules/dynamic_page_cache/dynamic_page_cache.services.yml
_defaults core/modules/jsonapi/jsonapi.services.yml
_defaults core/modules/jsonapi/tests/modules/jsonapi_test_resource_type_building/jsonapi_test_resource_type_building.services.yml
_defaults core/modules/config_translation/config_translation.services.yml
_defaults core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.services.yml
_defaults core/modules/media_library/media_library.services.yml
_defaults core/modules/layout_builder/layout_builder.services.yml

Other projects


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