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
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.admin_menu_block_page core/modules/system/system.services.yml Drupal\system\Access\SystemAdminMenuBlockAccessCheck access_check
access_check.admin_overview_page core/modules/system/system.services.yml Drupal\system\Access\SystemAdminMenuBlockAccessCheck access_check
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_builder_access core/modules/layout_builder/layout_builder.services.yml Drupal\layout_builder\Access\LayoutBuilderAccessCheck 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.field_reuse core/modules/field_ui/field_ui.services.yml Drupal\field_ui\Access\FieldReuseAccessCheck 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_route_access core/modules/jsonapi/jsonapi.services.yml Drupal\jsonapi\Access\RelationshipRouteAccessCheck access_check
access_check.latest_revision core/modules/content_moderation/content_moderation.services.yml Drupal\content_moderation\Access\LatestRevisionCheck 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.preview core/modules/node/node.services.yml Drupal\node\Access\NodePreviewAccessCheck access_check
access_check.permission core/modules/user/user.services.yml Drupal\user\Access\PermissionAccessCheck access_check
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
access_policy.super_user core/core.services.yml Drupal\Core\Session\SuperUserAccessPolicy access_policy
access_policy.user_roles core/core.services.yml Drupal\Core\Session\UserRolesAccessPolicy access_policy
access_policy_processor core/core.services.yml Drupal\Core\Session\AccessPolicyProcessor service_collector
account_switcher core/core.services.yml Drupal\Core\Session\AccountSwitcher
ajax_response.attachments_processor core/core.services.yml Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor
ajax_response.subscriber core/core.services.yml Drupal\Core\EventSubscriber\AjaxResponseSubscriber
announcements_feed.fetcher core/modules/announcements_feed/announcements_feed.services.yml Drupal\announcements_feed\AnnounceFetcher
announcements_feed.lazy_builders core/modules/announcements_feed/announcements_feed.services.yml Drupal\announcements_feed\LazyBuilders
announcements_feed.renderer core/modules/announcements_feed/announcements_feed.services.yml Drupal\announcements_feed\AnnounceRenderer
announce_feed_test.announce_client_middleware core/modules/announcements_feed/tests/modules/announce_feed_test/announce_feed_test.services.yml Drupal\announce_feed_test\AnnounceTestHttpClientMiddleware http_client_middleware
anonymous_user_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber
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.