Services - 8.9.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 893

Title File name Summary All service tags
entity_display.repository core/core.services.yml Drupal\Core\Entity\EntityDisplayRepository
entity_field.deleted_fields_repository core/core.services.yml Drupal\Core\Field\DeletedFieldsRepository
entity_field.manager core/core.services.yml Drupal\Core\Entity\EntityFieldManager
entity_route_subscriber core/core.services.yml Drupal\Core\EventSubscriber\EntityRouteProviderSubscriber event_subscriber
entity_test.definition.subscriber core/modules/system/tests/modules/entity_test/entity_test.services.yml Drupal\entity_test\EntityTestDefinitionSubscriber event_subscriber
entity_test_update.entity_schema_listener core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml Drupal\entity_test_update\EventSubscriber\EntitySchemaSubscriber event_subscriber
entity_type.bundle.info core/core.services.yml Drupal\Core\Entity\EntityTypeBundleInfo
entity_type.listener core/core.services.yml Drupal\Core\Entity\EntityTypeListener
entity_type.manager core/core.services.yml Drupal\Core\Entity\EntityTypeManager plugin_manager_cache_clear
entity_type.repository core/core.services.yml Drupal\Core\Entity\EntityTypeRepository
environment_cleaner core/modules/simpletest/simpletest.services.yml Drupal\simpletest\EnvironmentCleanerService
environment_cleaner_factory core/modules/simpletest/simpletest.services.yml Drupal\simpletest\EnvironmentCleanerFactory
event_dispatcher core/core.services.yml Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher
exception.custom_page_html core/core.services.yml Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber event_subscriber
exception.default_html core/core.services.yml Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber event_subscriber
exception.default_json core/core.services.yml Drupal\Core\EventSubscriber\ExceptionJsonSubscriber event_subscriber
exception.enforced_form_response core/core.services.yml Drupal\Core\EventSubscriber\EnforcedFormResponseSubscriber event_subscriber
exception.fast_404_html core/core.services.yml Drupal\Core\EventSubscriber\Fast404ExceptionHtmlSubscriber event_subscriber
exception.final core/core.services.yml Drupal\Core\EventSubscriber\FinalExceptionSubscriber event_subscriber
exception.logger core/core.services.yml Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber event_subscriber
exception.needs_installer core/core.services.yml Drupal\Core\EventSubscriber\ExceptionDetectNeedsInstallSubscriber event_subscriber
exception.test_site core/core.services.yml Drupal\Core\EventSubscriber\ExceptionTestSiteSubscriber event_subscriber
extension.list.module core/core.services.yml Drupal\Core\Extension\ModuleExtensionList
extension.list.profile core/core.services.yml Drupal\Core\Extension\ProfileExtensionList
extension.list.theme core/core.services.yml Drupal\Core\Extension\ThemeExtensionList
extension.list.theme_engine core/core.services.yml Drupal\Core\Extension\ThemeEngineExtensionList
feed.bridge.reader core/core.services.yml Drupal\Component\Bridge\ZfExtensionManagerSfContainer
feed.bridge.writer core/core.services.yml Drupal\Component\Bridge\ZfExtensionManagerSfContainer
feed.reader.atomentry core/core.services.yml Laminas\Feed\Reader\Extension\Atom\Entry
feed.reader.atomfeed core/core.services.yml Laminas\Feed\Reader\Extension\Atom\Feed
feed.reader.contententry core/core.services.yml Laminas\Feed\Reader\Extension\Content\Entry
feed.reader.dublincoreentry core/core.services.yml Laminas\Feed\Reader\Extension\DublinCore\Entry
feed.reader.dublincorefeed core/core.services.yml Laminas\Feed\Reader\Extension\DublinCore\Feed
feed.reader.podcastentry core/core.services.yml Laminas\Feed\Reader\Extension\Podcast\Entry
feed.reader.podcastfeed core/core.services.yml Laminas\Feed\Reader\Extension\Podcast\Feed
feed.reader.slashentry core/core.services.yml Laminas\Feed\Reader\Extension\Slash\Entry
feed.reader.threadentry core/core.services.yml Laminas\Feed\Reader\Extension\Thread\Entry
feed.reader.wellformedwebentry core/core.services.yml Laminas\Feed\Reader\Extension\WellFormedWeb\Entry
feed.writer.atomrendererfeed core/core.services.yml Laminas\Feed\Writer\Extension\Atom\Renderer\Feed
feed.writer.contentrendererentry core/core.services.yml Laminas\Feed\Writer\Extension\Content\Renderer\Entry
feed.writer.dublincorerendererentry core/core.services.yml Laminas\Feed\Writer\Extension\DublinCore\Renderer\Entry
feed.writer.dublincorerendererfeed core/core.services.yml Laminas\Feed\Writer\Extension\DublinCore\Renderer\Feed
feed.writer.itunesentry core/core.services.yml Laminas\Feed\Writer\Extension\ITunes\Entry
feed.writer.itunesfeed core/core.services.yml Laminas\Feed\Writer\Extension\ITunes\Feed
feed.writer.itunesrendererentry core/core.services.yml Laminas\Feed\Writer\Extension\ITunes\Renderer\Entry
feed.writer.itunesrendererfeed core/core.services.yml Laminas\Feed\Writer\Extension\ITunes\Renderer\Feed
feed.writer.slashrendererentry core/core.services.yml Laminas\Feed\Writer\Extension\Slash\Renderer\Entry
feed.writer.threadingrendererentry core/core.services.yml Laminas\Feed\Writer\Extension\Threading\Renderer\Entry
feed.writer.wellformedwebrendererentry core/core.services.yml Laminas\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry
field.uninstall_validator core/modules/field/field.services.yml Drupal\field\FieldUninstallValidator module_install.uninstall_validator

Other projects


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