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.config_override_integration_test core/modules/config/tests/config_override_integration_test/config_override_integration_test.services.yml Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext cache.context
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.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.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

Other projects