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

Name Filesort descending Class Tags
config.storage.sync core/core.services.yml Drupal\Core\Config\FileStorage
entity.query.keyvalue core/core.services.yml Drupal\Core\Entity\KeyValueStore\Query\QueryFactory
config.storage.snapshot core/core.services.yml Drupal\Core\Config\DatabaseStorage backend_overridable
router.dumper core/core.services.yml Drupal\Core\Routing\MatcherDumper backend_overridable
config.storage.schema core/core.services.yml Drupal\Core\Config\ExtensionInstallStorage
Drupal\Core\Routing\MatcherDumperInterface core/core.services.yml
config.typed core/core.services.yml Drupal\Core\Config\TypedConfigManager plugin_manager_cache_clear
router.builder core/core.services.yml Drupal\Core\Routing\RouteBuilder needs_destruction
Drupal\Core\Config\TypedConfigManagerInterface core/core.services.yml
Drupal\Core\Routing\RouteBuilderInterface core/core.services.yml
context.handler core/core.services.yml Drupal\Core\Plugin\Context\ContextHandler
menu.rebuild_subscriber core/core.services.yml Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber
Drupal\Core\Plugin\Context\ContextHandlerInterface core/core.services.yml
path.matcher core/core.services.yml Drupal\Core\Path\PathMatcher
context.repository core/core.services.yml Drupal\Core\Plugin\Context\LazyContextRepository service_id_collector
Drupal\Core\Path\PathMatcherInterface core/core.services.yml
Drupal\Core\Plugin\Context\ContextRepositoryInterface core/core.services.yml
path.validator core/core.services.yml Drupal\Core\Path\PathValidator
Drupal\Component\DependencyInjection\ReverseContainer core/core.services.yml
Drupal\Core\Path\PathValidatorInterface core/core.services.yml
cron core/core.services.yml Drupal\Core\Cron
password core/core.services.yml Drupal\Core\Password\PhpPassword
Drupal\Core\CronInterface core/core.services.yml
Drupal\Core\Password\PasswordInterface core/core.services.yml
diff.formatter core/core.services.yml Drupal\Core\Diff\DiffFormatter
password_generator core/core.services.yml Drupal\Core\Password\DefaultPasswordGenerator
Drupal\Core\Diff\DiffFormatter core/core.services.yml
Drupal\Core\Password\PasswordGeneratorInterface core/core.services.yml
database core/core.services.yml Drupal\Core\Database\Connection
request_format_route_filter core/core.services.yml Drupal\Core\Routing\RequestFormatRouteFilter route_filter
Drupal\Core\Database\Connection core/core.services.yml
method_filter core/core.services.yml Drupal\Core\Routing\MethodFilter route_filter
database.replica core/core.services.yml Drupal\Core\Database\Connection
content_type_header_matcher core/core.services.yml Drupal\Core\Routing\ContentTypeHeaderMatcher route_filter
database.replica_kill_switch core/core.services.yml Drupal\Core\Database\ReplicaKillSwitch
paramconverter_manager core/core.services.yml Drupal\Core\ParamConverter\ParamConverterManager service_collector
Drupal\Core\Database\ReplicaKillSwitch core/core.services.yml
Drupal\Core\ParamConverter\ParamConverterManagerInterface core/core.services.yml
datetime.time core/core.services.yml Drupal\Component\Datetime\Time
paramconverter_subscriber core/core.services.yml Drupal\Core\EventSubscriber\ParamConverterSubscriber
Drupal\Component\Datetime\TimeInterface core/core.services.yml
paramconverter.entity core/core.services.yml Drupal\Core\ParamConverter\EntityConverter paramconverter
file_system core/core.services.yml Drupal\Core\File\FileSystem
paramconverter.entity_revision core/core.services.yml Drupal\Core\ParamConverter\EntityRevisionParamConverter paramconverter
Drupal\Core\File\FileSystemInterface core/core.services.yml
paramconverter.configentity_admin core/core.services.yml Drupal\Core\ParamConverter\AdminPathConfigEntityConverter paramconverter
file_url_generator core/core.services.yml Drupal\Core\File\FileUrlGenerator
route_subscriber.module core/core.services.yml Drupal\Core\EventSubscriber\ModuleRouteSubscriber
Drupal\Core\File\FileUrlGeneratorInterface core/core.services.yml
resolver_manager.entity core/core.services.yml Drupal\Core\Entity\EntityResolverManager

Pages

Other projects