You are here

Services in Drupal 9

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 descending File Class Tags
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.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 event_subscriber
workspaces.manager core/modules/workspaces/workspaces.services.yml Drupal\workspaces\WorkspaceManager service_id_collector
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 event_subscriber
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

Pages

Other projects