Services - main - 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 912

Title File name Summary All service tags
node.route_subscriber core/modules/node/node.services.yml Drupal\node\Routing\RouteSubscriber
node.view_all_nodes_memory_cache core/modules/node/node.services.yml Drupal\Core\Cache\MemoryCache\MemoryCache
node_preview core/modules/node/node.services.yml Drupal\node\ParamConverter\NodePreviewConverter paramconverter
options_request_listener core/core.services.yml Drupal\Core\EventSubscriber\OptionsRequestSubscriber
package_manager.direct_write_precondition.directories core/modules/package_manager/package_manager.services.yml Drupal\package_manager\DirectWritePreconditionBypass
package_manager.direct_write_precondition.rsync core/modules/package_manager/package_manager.services.yml Drupal\package_manager\DirectWritePreconditionBypass
package_manager.validator.collect_paths_to_exclude_fail core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.services.yml Drupal\package_manager_test_validation\CollectPathsToExcludeFailValidator event_subscriber
package_manager_test_event_logger.subscriber core/modules/package_manager/tests/modules/package_manager_test_event_logger/package_manager_test_event_logger.services.yml Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber event_subscriber
package_manager_test_validation.subscriber core/modules/package_manager/tests/modules/package_manager_test_validation/package_manager_test_validation.services.yml Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber event_subscriber
pager.manager core/core.services.yml Drupal\Core\Pager\PagerManager
pager.parameters core/core.services.yml Drupal\Core\Pager\PagerParameters
page_cache_kill_switch core/core.services.yml Drupal\Core\PageCache\ResponsePolicy\KillSwitch page_cache_response_policy, dynamic_page_cache_response_policy
page_cache_no_cache_routes core/core.services.yml Drupal\Core\PageCache\ResponsePolicy\DenyNoCacheRoutes page_cache_response_policy, dynamic_page_cache_response_policy
page_cache_no_server_error core/core.services.yml Drupal\Core\PageCache\ResponsePolicy\NoServerError page_cache_response_policy, dynamic_page_cache_response_policy
page_cache_request_policy core/core.services.yml Drupal\Core\PageCache\DefaultRequestPolicy service_collector
page_cache_response_policy core/core.services.yml Drupal\Core\PageCache\ChainResponsePolicy service_collector
paramconverter.configentity_admin core/core.services.yml Drupal\Core\ParamConverter\AdminPathConfigEntityConverter paramconverter
paramconverter.entity core/core.services.yml Drupal\Core\ParamConverter\EntityConverter paramconverter
paramconverter.entity_revision core/core.services.yml Drupal\Core\ParamConverter\EntityRevisionParamConverter paramconverter
paramconverter.jsonapi.entity_uuid core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\ParamConverter\EntityUuidConverter paramconverter
paramconverter.jsonapi.resource_type core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\ParamConverter\ResourceTypeConverter paramconverter
paramconverter.menu_link core/core.services.yml Drupal\Core\ParamConverter\MenuLinkPluginConverter paramconverter
paramconverter.views_ui core/modules/views_ui/views_ui.services.yml Drupal\views_ui\ParamConverter\ViewUIConverter paramconverter
paramconverter_manager core/core.services.yml Drupal\Core\ParamConverter\ParamConverterManager service_collector
paramconverter_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ParamConverterSubscriber
password core/core.services.yml Drupal\Core\Password\PhpPassword
password core/modules/user/tests/modules/user_custom_pass_hash_params_test/user_custom_pass_hash_params_test.services.yml Drupal\Core\Password\PhpPassword
password_generator core/core.services.yml Drupal\Core\Password\DefaultPasswordGenerator
path.current core/core.services.yml Drupal\Core\Path\CurrentPathStack
path.matcher core/core.services.yml Drupal\Core\Path\PathMatcher
path.validator core/core.services.yml Drupal\Core\Path\PathValidator
path_alias.manager core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasManager
path_alias.path_processor core/modules/path_alias/path_alias.services.yml Drupal\path_alias\PathProcessor\AliasPathProcessor path_processor_inbound, path_processor_outbound
path_alias.prefix_list core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasPrefixList needs_destruction
path_alias.repository core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasRepository backend_overridable
path_alias.whitelist core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasWhitelist needs_destruction
path_processor.files core/modules/system/system.services.yml Drupal\system\PathProcessor\PathProcessorFiles path_processor_inbound
path_processor.image_styles core/modules/image/image.services.yml Drupal\image\PathProcessor\PathProcessorImageStyles path_processor_inbound
path_processor_decode core/core.services.yml Drupal\Core\PathProcessor\PathProcessorDecode path_processor_inbound
path_processor_front core/core.services.yml Drupal\Core\PathProcessor\PathProcessorFront path_processor_inbound
path_processor_manager core/core.services.yml Drupal\Core\PathProcessor\PathProcessorManager service_collector
performance_test.cache_factory core/modules/system/tests/modules/performance_test/performance_test.services.yml Drupal\performance_test\Cache\CacheFactoryDecorator
performance_test.cache_tags.invalidator.checksum core/modules/system/tests/modules/performance_test/performance_test.services.yml Drupal\performance_test\Cache\CacheTagsChecksumDecorator
permission_checker core/core.services.yml Drupal\Core\Session\PermissionChecker
pgsql.entity.query.sql core/modules/pgsql/pgsql.services.yml Drupal\pgsql\EntityQuery\QueryFactory
pgsql.views.date_sql core/modules/views/views.services.yml Drupal\views\Plugin\views\query\PostgresqlDateSql
phpass.password core/modules/phpass/phpass.services.yml Drupal\phpass\Password\PhpassHashedPassword
PhpTuf\ComposerStager\API\Core\BeginnerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Beginner
PhpTuf\ComposerStager\API\Core\CleanerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Cleaner
PhpTuf\ComposerStager\API\Core\CommitterInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Committer

Other projects


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