Services - main - 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 912

Title File name Summary All service tags
path.matcher core/core.services.yml Drupal\Core\Path\PathMatcher
path.validator core/core.services.yml Drupal\Core\Path\PathValidator
path_alias.manager core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasManager
path_alias.path_processor core/modules/path_alias/path_alias.services.yml Drupal\path_alias\PathProcessor\AliasPathProcessor path_processor_inbound, path_processor_outbound
path_alias.prefix_list core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasPrefixList needs_destruction
path_alias.repository core/modules/path_alias/path_alias.services.yml Drupal\path_alias\AliasRepository backend_overridable
path_processor.files core/modules/system/system.services.yml Drupal\system\PathProcessor\PathProcessorFiles path_processor_inbound
path_processor.image_styles core/modules/image/image.services.yml Drupal\image\PathProcessor\PathProcessorImageStyles path_processor_inbound
path_processor_decode core/core.services.yml Drupal\Core\PathProcessor\PathProcessorDecode path_processor_inbound
path_processor_front core/core.services.yml Drupal\Core\PathProcessor\PathProcessorFront path_processor_inbound
path_processor_manager core/core.services.yml Drupal\Core\PathProcessor\PathProcessorManager
performance_test.cache_factory core/modules/system/tests/modules/performance_test/performance_test.services.yml Drupal\performance_test\Cache\CacheFactoryDecorator
performance_test.cache_tags.invalidator.checksum core/modules/system/tests/modules/performance_test/performance_test.services.yml Drupal\performance_test\Cache\CacheTagsChecksumDecorator
permission_checker core/core.services.yml Drupal\Core\Session\PermissionChecker
pgsql.entity.query.sql core/modules/pgsql/pgsql.services.yml Drupal\pgsql\EntityQuery\QueryFactory
pgsql.views.date_sql core/modules/views/views.services.yml Drupal\views\Plugin\views\query\PostgresqlDateSql
phpass.password core/modules/phpass/phpass.services.yml Drupal\phpass\Password\PhpassHashedPassword
PhpTuf\ComposerStager\API\Core\BeginnerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Beginner
PhpTuf\ComposerStager\API\Core\CleanerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Cleaner
PhpTuf\ComposerStager\API\Core\CommitterInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Committer
PhpTuf\ComposerStager\API\Core\StagerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Core\Stager
PhpTuf\ComposerStager\API\Environment\Service\EnvironmentInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Environment\Service\Environment
PhpTuf\ComposerStager\API\FileSyncer\Service\FileSyncerInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\FileSyncer\Service\FileSyncer
PhpTuf\ComposerStager\API\Filesystem\Service\FilesystemInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Filesystem\Service\Filesystem
PhpTuf\ComposerStager\API\Finder\Service\ExecutableFinderInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Finder\Service\ExecutableFinder
PhpTuf\ComposerStager\API\Finder\Service\FileFinderInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Finder\Service\FileFinder
PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Path\Factory\PathFactory
PhpTuf\ComposerStager\API\Path\Factory\PathListFactoryInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Path\Factory\PathListFactory
PhpTuf\ComposerStager\API\Precondition\Service\ActiveAndStagingDirsAreDifferentInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveAndStagingDirsAreDifferent
PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirExistsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirExists
PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirIsReadyInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirIsReady
PhpTuf\ComposerStager\API\Precondition\Service\ActiveDirIsWritableInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\ActiveDirIsWritable
PhpTuf\ComposerStager\API\Precondition\Service\BeginnerPreconditionsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\BeginnerPreconditions
PhpTuf\ComposerStager\API\Precondition\Service\CleanerPreconditionsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\CleanerPreconditions
PhpTuf\ComposerStager\API\Precondition\Service\CommitterPreconditionsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\CommitterPreconditions
PhpTuf\ComposerStager\API\Precondition\Service\CommonPreconditionsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\CommonPreconditions
PhpTuf\ComposerStager\API\Precondition\Service\ComposerIsAvailableInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\ComposerIsAvailable
PhpTuf\ComposerStager\API\Precondition\Service\HostSupportsRunningProcessesInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\HostSupportsRunningProcesses
PhpTuf\ComposerStager\API\Precondition\Service\NoAbsoluteSymlinksExistInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoAbsoluteSymlinksExist
PhpTuf\ComposerStager\API\Precondition\Service\NoHardLinksExistInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoHardLinksExist
PhpTuf\ComposerStager\API\Precondition\Service\NoLinksExistOnWindowsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoLinksExistOnWindows
PhpTuf\ComposerStager\API\Precondition\Service\NoNestingOnWindowsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoNestingOnWindows
PhpTuf\ComposerStager\API\Precondition\Service\NoSymlinksPointOutsideTheCodebaseInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoSymlinksPointOutsideTheCodebase
PhpTuf\ComposerStager\API\Precondition\Service\NoUnsupportedLinksExistInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\NoUnsupportedLinksExist
PhpTuf\ComposerStager\API\Precondition\Service\RsyncIsAvailableInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\RsyncIsAvailable
PhpTuf\ComposerStager\API\Precondition\Service\StagerPreconditionsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\StagerPreconditions
PhpTuf\ComposerStager\API\Precondition\Service\StagingDirDoesNotExistInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirDoesNotExist
PhpTuf\ComposerStager\API\Precondition\Service\StagingDirExistsInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirExists
PhpTuf\ComposerStager\API\Precondition\Service\StagingDirIsReadyInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirIsReady
PhpTuf\ComposerStager\API\Precondition\Service\StagingDirIsWritableInterface core/modules/package_manager/package_manager.services.yml PhpTuf\ComposerStager\Internal\Precondition\Service\StagingDirIsWritable

Other projects


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