Services - 9.5.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 905

Title File name Summary All service tags
update.update_hook_registry_factory core/core.services.yml Drupal\Core\Update\UpdateHookRegistryFactory
update_script_test.broken_path_processor core/modules/system/tests/modules/update_script_test/update_script_test.services.yml Drupal\update_script_test\PathProcessor\BrokenInboundPathProcessor path_processor_inbound
url_alter_test.path_processor core/modules/system/tests/modules/url_alter_test/url_alter_test.services.yml Drupal\url_alter_test\PathProcessorTest path_processor_inbound, path_processor_outbound
url_generator core/core.services.yml Drupal\Core\Render\MetadataBubblingUrlGenerator
url_generator.non_bubbling core/core.services.yml Drupal\Core\Routing\UrlGenerator
user.auth core/modules/user/user.services.yml Drupal\user\UserAuth
user.authentication.cookie core/modules/user/user.services.yml Drupal\user\Authentication\Provider\Cookie authentication_provider, event_subscriber
user.current_user_context core/modules/user/user.services.yml Drupal\user\ContextProvider\CurrentUserContext context_provider
user.data core/modules/user/user.services.yml Drupal\user\UserData backend_overridable
user.flood_control core/modules/user/user.services.yml Drupal\user\UserFloodControl
user.flood_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\UserFloodSubscriber event_subscriber
user.permissions core/modules/user/user.services.yml Drupal\user\PermissionHandler
user.toolbar_link_builder core/modules/user/user.services.yml Drupal\user\ToolbarLinkBuilder
user_access_denied_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\AccessDeniedSubscriber event_subscriber
user_last_access_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\UserRequestSubscriber event_subscriber
user_maintenance_mode_subscriber core/modules/user/user.services.yml Drupal\user\EventSubscriber\MaintenanceModeSubscriber event_subscriber
user_permissions_hash_generator core/core.services.yml Drupal\Core\Session\PermissionsHashGenerator
uuid core/core.services.yml Drupal\Component\Uuid\Php
validation.constraint core/core.services.yml Drupal\Core\Validation\ConstraintManager plugin_manager_cache_clear
views.analyzer core/modules/views/views.services.yml Drupal\views\Analyzer
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 event_subscriber
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 event_subscriber
views.views_data core/modules/views/views.services.yml Drupal\views\ViewsData
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
_defaults core/modules/system/tests/modules/services_defaults_test/services_defaults_test.services.yml foo.tag1, bar.tag2, bar.tag3

Other projects


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