Services.yaml¶
Services can be configured in this file. TYPO3 uses it for:
- Dependency Injection
- Event Listeners
- Command Controllers (see Feature: #89139 - Add dependency injection support for console commands)
- Registering a widget with the dashboard
A typical Configuration/
may look like this:
services:
_defaults:
autowire: true
autoconfigure: true
public: false
T3docs\Examples\:
resource: '../Classes/*'
exclude: '../Classes/Domain/Model/*'
MyVendor\MyExtension\LinkValidator\LinkType\ExampleLinkType:
tags:
- name: linkvalidator.linktype
See also
- TYPO3 uses the Symfony Dependency Injection component. The official documentation can be found at https://symfony.com/doc/current/service_container.html
- It is possible to use a glob pattern for the file paths, for example
'../
.Classes/*'