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
logger.channel.php core/core.services.yml
main_content_renderer.off_canvas_top core/core.services.yml Drupal\Core\Render\MainContent\OffCanvasRenderer render.main_content_renderer
logger.channel.mail core/core.services.yml
logger.channel.image core/core.services.yml
main_content_renderer.modal core/core.services.yml Drupal\Core\Render\MainContent\ModalRenderer render.main_content_renderer
Drupal\Component\Serialization\ObjectAwareSerializationInterface core/core.services.yml
logger.channel.cron core/core.services.yml
controller.form core/core.services.yml Drupal\Core\Controller\HtmlFormController
extension.list.database_driver core/core.services.yml Drupal\Core\Extension\DatabaseDriverList
logger.channel.file core/core.services.yml Drupal\Core\Logger\LoggerChannel
Drupal\Core\Controller\HtmlFormController core/core.services.yml
Drupal\Core\Extension\DatabaseDriverList core/core.services.yml
logger.channel.form core/core.services.yml
controller.entity_form core/core.services.yml Drupal\Core\Entity\HtmlEntityFormController
plugin.manager.field.field_type_category core/core.services.yml \Drupal\Core\Field\FieldTypeCategoryManager
logger.channel.security core/core.services.yml
Drupal\Core\Entity\HtmlEntityFormController core/core.services.yml
Drupal\Core\Field\FieldTypeCategoryManagerInterface core/core.services.yml
logger.log_message_parser core/core.services.yml Drupal\Core\Logger\LogMessageParser
form_ajax_response_builder core/core.services.yml Drupal\Core\Form\FormAjaxResponseBuilder
Psr\EventDispatcher\EventDispatcherInterface core/core.services.yml
Drupal\Core\Logger\LogMessageParserInterface core/core.services.yml
Drupal\Core\Form\FormAjaxResponseBuilderInterface core/core.services.yml
callable_resolver core/core.services.yml Drupal\Core\Utility\CallableResolver
serialization.json core/core.services.yml Drupal\Component\Serialization\Json
router_listener core/core.services.yml Symfony\Component\HttpKernel\EventListener\RouterListener
Drupal\Core\Utility\CallableResolver core/core.services.yml
serialization.phpserialize core/core.services.yml Drupal\Component\Serialization\PhpSerialize
options_request_listener core/core.services.yml Drupal\Core\EventSubscriber\OptionsRequestSubscriber
http_middleware.content_length core/core.services.yml Drupal\Core\StackMiddleware\ContentLength http_middleware
serialization.yaml core/core.services.yml Drupal\Component\Serialization\Yaml
bare_html_page_renderer core/core.services.yml Drupal\Core\Render\BareHtmlPageRenderer
http_middleware.ajax_page_state core/core.services.yml Drupal\Core\StackMiddleware\AjaxPageState http_middleware
settings core/core.services.yml Drupal\Core\Site\Settings
Drupal\Core\Render\BareHtmlPageRendererInterface core/core.services.yml
validation.basic_recursive_validator_factory core/core.services.yml Drupal\Core\Validation\BasicRecursiveValidatorFactory
Drupal\Core\Site\Settings core/core.services.yml
private_key core/core.services.yml Drupal\Core\PrivateKey
Drupal\Core\Validation\BasicRecursiveValidatorFactory core/core.services.yml
state core/core.services.yml Drupal\Core\State\State needs_destruction
Drupal\Core\PrivateKey core/core.services.yml
access_policy_processor core/core.services.yml Drupal\Core\Session\AccessPolicyProcessor service_collector
Drupal\Core\State\StateInterface core/core.services.yml
csrf_token core/core.services.yml Drupal\Core\Access\CsrfTokenGenerator
Drupal\Core\Session\AccessPolicyChainInterface core/core.services.yml
queue core/core.services.yml Drupal\Core\Queue\QueueFactory
Drupal\Core\Access\CsrfTokenGenerator core/core.services.yml
permission_checker core/core.services.yml Drupal\Core\Session\PermissionChecker
Drupal\Core\Queue\QueueFactory core/core.services.yml
access_arguments_resolver_factory core/core.services.yml Drupal\Core\Access\AccessArgumentsResolverFactory

Pages

Other projects