Services - 8.9.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 893

Title File name Summary All service tags
accept_header_matcher core/modules/system/tests/modules/accept_header_routing_test/accept_header_routing_test.services.yml Drupal\accept_header_routing_test\Routing\AcceptHeaderMatcher route_filter
access_arguments_resolver_factory core/core.services.yml Drupal\Core\Access\AccessArgumentsResolverFactory
access_check.book.removable core/modules/book/book.services.yml Drupal\book\Access\BookNodeIsRemovableAccessCheck access_check
access_check.contact_personal core/modules/contact/contact.services.yml Drupal\contact\Access\ContactPageAccess access_check
access_check.cron core/modules/system/system.services.yml Drupal\system\Access\CronAccessCheck access_check
access_check.csrf core/core.services.yml Drupal\Core\Access\CsrfAccessCheck access_check
access_check.custom core/core.services.yml Drupal\Core\Access\CustomAccessCheck access_check
access_check.db_update core/modules/system/system.services.yml Drupal\system\Access\DbUpdateAccessCheck access_check
access_check.default core/core.services.yml Drupal\Core\Access\DefaultAccessCheck access_check
access_check.entity core/core.services.yml Drupal\Core\Entity\EntityAccessCheck access_check
access_check.entity.layout core/modules/layout_builder/layout_builder.services.yml Drupal\layout_builder\Access\LayoutSectionAccessCheck access_check
access_check.entity.layout_builder_access core/modules/layout_builder/layout_builder.services.yml Drupal\layout_builder\Access\LayoutBuilderAccessCheck access_check
access_check.entity_bundles core/core.services.yml Drupal\Core\Entity\EntityBundleAccessCheck access_check
access_check.entity_create core/core.services.yml Drupal\Core\Entity\EntityCreateAccessCheck access_check
access_check.entity_create_any core/core.services.yml Drupal\Core\Entity\EntityCreateAnyAccessCheck access_check
access_check.entity_delete_multiple core/core.services.yml Drupal\Core\Entity\EntityDeleteMultipleAccessCheck access_check
access_check.field_ui.form_mode core/modules/field_ui/field_ui.services.yml Drupal\field_ui\Access\FormModeAccessCheck access_check
access_check.field_ui.view_mode core/modules/field_ui/field_ui.services.yml Drupal\field_ui\Access\ViewModeAccessCheck access_check
access_check.header.csrf core/core.services.yml Drupal\Core\Access\CsrfRequestHeaderAccessCheck access_check
access_check.jsonapi.relationship_field_access core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Access\RelationshipFieldAccess access_check
access_check.latest_revision core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\Access\LatestRevisionCheck access_check
access_check.media.revision core/modules/media/media.services.yml Drupal\media\Access\MediaRevisionAccessCheck access_check
access_check.menu_test_session core/modules/system/tests/modules/menu_test/menu_test.services.yml Drupal\menu_test\Access\AccessCheck access_check
access_check.node.add core/modules/node/node.services.yml Drupal\node\Access\NodeAddAccessCheck access_check
access_check.node.preview core/modules/node/node.services.yml Drupal\node\Access\NodePreviewAccessCheck access_check
access_check.node.revision core/modules/node/node.services.yml Drupal\node\Access\NodeRevisionAccessCheck access_check
access_check.permission core/modules/user/user.services.yml Drupal\user\Access\PermissionAccessCheck access_check
access_check.quickedit.entity_field core/modules/quickedit/quickedit.services.yml Drupal\quickedit\Access\QuickEditEntityFieldAccessCheck access_check
access_check.rest.csrf core/modules/rest/rest.services.yml Alias of access_check.header.csrf
access_check.settings_tray.block.has_overrides core/modules/settings_tray/settings_tray.services.yml Drupal\settings_tray\Access\BlockHasOverridesAccessCheck access_check
access_check.settings_tray.block.settings_tray_form core/modules/settings_tray/settings_tray.services.yml Drupal\settings_tray\Access\BlockPluginHasSettingsTrayFormAccessCheck access_check
access_check.theme core/core.services.yml Drupal\Core\Theme\ThemeAccessCheck access_check
access_check.update.manager_access core/modules/update/update.services.yml Drupal\update\Access\UpdateManagerAccessCheck access_check
access_check.user.login_status core/modules/user/user.services.yml Drupal\user\Access\LoginStatusCheck access_check
access_check.user.register core/modules/user/user.services.yml Drupal\user\Access\RegisterAccessCheck access_check
access_check.user.role core/modules/user/user.services.yml Drupal\user\Access\RoleAccessCheck access_check
access_check.workspaces.active_workspace core/modules/workspaces/workspaces.services.yml Drupal\workspaces\Access\ActiveWorkspaceCheck access_check
access_manager core/core.services.yml Drupal\Core\Access\AccessManager
access_manager.check_provider core/core.services.yml Drupal\Core\Access\CheckProvider
account_switcher core/core.services.yml Drupal\Core\Session\AccountSwitcher
aggregator.items.importer core/modules/aggregator/aggregator.services.yml Drupal\aggregator\ItemsImporter
ajax_response.attachments_processor core/core.services.yml Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor
ajax_response.subscriber core/core.services.yml Drupal\Core\EventSubscriber\AjaxResponseSubscriber event_subscriber
anonymous_user_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber event_subscriber
app.root core/core.services.yml SplString parameter_service
app.root.factory core/core.services.yml Drupal\Core\AppRootFactory
argument_resolver.default core/core.services.yml Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver
argument_resolver.psr7_request core/core.services.yml Drupal\Core\Controller\ArgumentResolver\Psr7RequestValueResolver
argument_resolver.request core/core.services.yml Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver
argument_resolver.request_attribute core/core.services.yml Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver

Other projects


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