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
Drupal\workspaces\WorkspaceManagerInterface core/modules/workspaces/workspaces.services.yml
Drupal\workspaces\WorkspaceOperationFactory core/modules/workspaces/workspaces.services.yml
Drupal\workspaces\WorkspaceRepositoryInterface core/modules/workspaces/workspaces.services.yml
Drupal\workspaces\WorkspacesLazyBuilders core/modules/workspaces/workspaces.services.yml
dynamic_page_cache_deny_admin_routes core/modules/dynamic_page_cache/dynamic_page_cache.services.yml Drupal\dynamic_page_cache\PageCache\ResponsePolicy\DenyAdminRoutes dynamic_page_cache_response_policy
dynamic_page_cache_request_policy core/modules/dynamic_page_cache/dynamic_page_cache.services.yml Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy service_collector
dynamic_page_cache_response_policy core/modules/dynamic_page_cache/dynamic_page_cache.services.yml Drupal\Core\PageCache\ChainResponsePolicy service_collector
dynamic_page_cache_subscriber core/modules/dynamic_page_cache/dynamic_page_cache.services.yml Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber
early_rendering_controller_wrapper_subscriber core/core.services.yml Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber
early_translation_test.authentication.early_translation_test core/modules/locale/tests/modules/early_translation_test/early_translation_test.services.yml Drupal\early_translation_test\Auth authentication_provider
editor.config_translation_mapper_subscriber core/modules/editor/editor.services.yml Drupal\editor\EventSubscriber\EditorConfigTranslationSubscriber
element.editor core/modules/editor/editor.services.yml Drupal\editor\Element
element_info core/core.services.yml Alias of plugin.manager.element_info
email.validator core/core.services.yml Drupal\Component\Utility\EmailValidator
entity.autocomplete_matcher core/core.services.yml Drupal\Core\Entity\EntityAutocompleteMatcher
entity.bundle_config_import_validator core/core.services.yml Drupal\Core\Entity\Event\BundleConfigImportValidate
entity.definition_update_manager core/core.services.yml Drupal\Core\Entity\EntityDefinitionUpdateManager
entity.form_builder core/core.services.yml Drupal\Core\Entity\EntityFormBuilder
entity.last_installed_schema.repository core/core.services.yml Drupal\Core\Entity\EntityLastInstalledSchemaRepository
entity.memory_cache core/core.services.yml Drupal\Core\Cache\MemoryCache\MemoryCache
entity.query.config core/core.services.yml Drupal\Core\Config\Entity\Query\QueryFactory
entity.query.keyvalue core/core.services.yml Drupal\Core\Entity\KeyValueStore\Query\QueryFactory
entity.query.null core/core.services.yml Drupal\Core\Entity\Query\Null\QueryFactory
entity.query.sql core/core.services.yml Drupal\Core\Entity\Query\Sql\QueryFactory backend_overridable
entity.repository core/core.services.yml Drupal\Core\Entity\EntityRepository
entity_bundle.listener core/core.services.yml Drupal\Core\Entity\EntityBundleListener
entity_display.repository core/core.services.yml Drupal\Core\Entity\EntityDisplayRepository
entity_field.deleted_fields_repository core/core.services.yml Drupal\Core\Field\DeletedFieldsRepository
entity_field.manager core/core.services.yml Drupal\Core\Entity\EntityFieldManager
entity_route_subscriber core/core.services.yml Drupal\Core\EventSubscriber\EntityRouteProviderSubscriber
entity_test.definition.subscriber core/modules/system/tests/modules/entity_test/entity_test.services.yml Drupal\entity_test\EntityTestDefinitionSubscriber
entity_test_update.entity_schema_listener core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml Drupal\entity_test_update\EventSubscriber\EntitySchemaSubscriber
entity_type.bundle.info core/core.services.yml Drupal\Core\Entity\EntityTypeBundleInfo
entity_type.listener core/core.services.yml Drupal\Core\Entity\EntityTypeListener
entity_type.manager core/core.services.yml Drupal\Core\Entity\EntityTypeManager plugin_manager_cache_clear
entity_type.repository core/core.services.yml Drupal\Core\Entity\EntityTypeRepository
event_dispatcher core/core.services.yml Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
exception.custom_page_html core/core.services.yml Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber
exception.default_html core/core.services.yml Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber
exception.default_json core/core.services.yml Drupal\Core\EventSubscriber\ExceptionJsonSubscriber
exception.enforced_form_response core/core.services.yml Drupal\Core\EventSubscriber\EnforcedFormResponseSubscriber
exception.fast_404_html core/core.services.yml Drupal\Core\EventSubscriber\Fast404ExceptionHtmlSubscriber
exception.final core/core.services.yml Drupal\Core\EventSubscriber\FinalExceptionSubscriber
exception.logger core/core.services.yml Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber
exception.needs_installer core/core.services.yml Drupal\Core\EventSubscriber\ExceptionDetectNeedsInstallSubscriber
extension.list.database_driver core/core.services.yml Drupal\Core\Extension\DatabaseDriverList
extension.list.module core/core.services.yml Drupal\Core\Extension\ModuleExtensionList
extension.list.profile core/core.services.yml Drupal\Core\Extension\ProfileExtensionList
extension.list.theme core/core.services.yml Drupal\Core\Extension\ThemeExtensionList
extension.list.theme_engine core/core.services.yml Drupal\Core\Extension\ThemeEngineExtensionList

Other projects


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