Primary tabs

  1. 8.5.x core/core.api.php listing_page_service
  2. 8.0.x core/core.api.php listing_page_service
  3. 8.1.x core/core.api.php listing_page_service
  4. 8.2.x core/core.api.php listing_page_service
  5. 8.3.x core/core.api.php listing_page_service
  6. 8.4.x core/core.api.php listing_page_service
  7. 8.6.x core/core.api.php listing_page_service

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

Contains filters are case sensitive
Namesort descending File Class Tags
cache_context.cookies core/core.services.yml Drupal\Core\Cache\Context\CookiesCacheContext cache.context
cache_context.entity_test_view_grants core/modules/system/tests/modules/entity_test/entity_test.services.yml Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext cache.context
cache_context.headers core/core.services.yml Drupal\Core\Cache\Context\HeadersCacheContext cache.context
cache_context.ip core/core.services.yml Drupal\Core\Cache\Context\IpCacheContext cache.context
cache_context.languages core/core.services.yml Drupal\Core\Cache\Context\LanguagesCacheContext cache.context
cache_context.layout_builder_is_active core/modules/layout_builder/layout_builder.services.yml Drupal\layout_builder\Cache\LayoutBuilderIsActiveCacheContext cache.context
cache_context.pirate_day core/modules/config/tests/config_override_test/config_override_test.services.yml Drupal\config_override_test\Cache\PirateDayCacheContext cache.context
cache_context.request_format core/core.services.yml Drupal\Core\Cache\Context\RequestFormatCacheContext cache.context
cache_context.route core/core.services.yml Drupal\Core\Cache\Context\RouteCacheContext cache.context
cache_context.route.book_navigation core/modules/book/book.services.yml Drupal\book\Cache\BookNavigationCacheContext cache.context
cache_context.route.menu_active_trails core/core.services.yml Drupal\Core\Cache\Context\MenuActiveTrailsCacheContext cache.context
cache_context.route.name core/core.services.yml Drupal\Core\Cache\Context\RouteNameCacheContext cache.context
cache_context.session core/core.services.yml Drupal\Core\Cache\Context\SessionCacheContext cache.context
cache_context.session.exists core/core.services.yml Drupal\Core\Cache\Context\SessionExistsCacheContext cache.context
cache_context.theme core/core.services.yml Drupal\Core\Cache\Context\ThemeCacheContext cache.context
cache_context.timezone core/core.services.yml Drupal\Core\Cache\Context\TimeZoneCacheContext cache.context
cache_context.url core/core.services.yml Drupal\Core\Cache\Context\UrlCacheContext cache.context
cache_context.url.path core/core.services.yml Drupal\Core\Cache\Context\PathCacheContext cache.context
cache_context.url.path.is_front core/core.services.yml Drupal\Core\Cache\Context\IsFrontPathCacheContext cache.context
cache_context.url.path.parent core/core.services.yml Drupal\Core\Cache\Context\PathParentCacheContext cache.context
cache_context.url.query_args core/core.services.yml Drupal\Core\Cache\Context\QueryArgsCacheContext cache.context
cache_context.url.query_args.pagers core/core.services.yml Drupal\Core\Cache\Context\PagersCacheContext cache.context
cache_context.url.site core/core.services.yml Drupal\Core\Cache\Context\SiteCacheContext cache.context
cache_context.user core/core.services.yml Drupal\Core\Cache\Context\UserCacheContext cache.context
cache_context.user.is_super_user core/core.services.yml Drupal\Core\Cache\Context\IsSuperUserCacheContext cache.context
cache_context.user.node_grants core/modules/node/node.services.yml Drupal\node\Cache\NodeAccessGrantsCacheContext cache.context
cache_context.user.permissions core/core.services.yml Drupal\Core\Cache\Context\AccountPermissionsCacheContext cache.context
cache_context.user.roles core/core.services.yml Drupal\Core\Cache\Context\UserRolesCacheContext cache.context
cache_context.views_test_cache_context core/modules/views/tests/modules/views_test_data/views_test_data.services.yml Drupal\views_test_data\Cache\ViewsTestCacheContext cache.context
cache_contexts_manager core/core.services.yml Drupal\Core\Cache\Context\CacheContextsManager
cache_factory core/core.services.yml Drupal\Core\Cache\CacheFactory
cache_router_rebuild_subscriber core/core.services.yml Drupal\Core\EventSubscriber\CacheRouterRebuildSubscriber event_subscriber
cache_tags.invalidator core/core.services.yml Drupal\Core\Cache\CacheTagsInvalidator service_collector
cache_tags.invalidator.checksum core/core.services.yml Drupal\Core\Cache\DatabaseCacheTagsChecksum cache_tags_invalidator
class_resolver core/core.services.yml Drupal\Core\DependencyInjection\ClassResolver
client_error_response_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ClientErrorResponseSubscriber event_subscriber
color.config_cache_invalidator core/modules/color/color.services.yml Drupal\color\EventSubscriber\ColorConfigCacheInvalidator event_subscriber
comment.breadcrumb core/modules/comment/comment.services.yml Drupal\comment\CommentBreadcrumbBuilder breadcrumb_builder
comment.lazy_builders core/modules/comment/comment.services.yml Drupal\comment\CommentLazyBuilders
comment.link_builder core/modules/comment/comment.services.yml Drupal\comment\CommentLinkBuilder
comment.manager core/modules/comment/comment.services.yml Drupal\comment\CommentManager
comment.statistics core/modules/comment/comment.services.yml Drupal\comment\CommentStatistics backend_overridable
config.config_subscriber core/modules/config/config.services.yml Drupal\config\ConfigSubscriber event_subscriber
config.factory core/core.services.yml Drupal\Core\Config\ConfigFactory event_subscriber, service_collector
config.importer_subscriber core/core.services.yml Drupal\Core\Config\Importer\FinalMissingContentSubscriber event_subscriber
config.installer core/core.services.yml Drupal\Core\Config\ConfigInstaller
config.manager core/core.services.yml Drupal\Core\Config\ConfigManager
config.storage core/core.services.yml Drupal\Core\Config\CachedStorage
config.storage.active core/core.services.yml Drupal\Core\Config\DatabaseStorage backend_overridable
config.storage.schema core/core.services.yml Drupal\Core\Config\ExtensionInstallStorage

Pages

Other projects