class InlineFormErrorsServiceProvider in Drupal 10
Same name and namespace in other branches
- 8 core/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php \Drupal\inline_form_errors\InlineFormErrorsServiceProvider
- 9 core/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php \Drupal\inline_form_errors\InlineFormErrorsServiceProvider
Overrides the form_error_handler service to enable inline form errors.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\inline_form_errors\InlineFormErrorsServiceProvider
Expanded class hierarchy of InlineFormErrorsServiceProvider
File
- core/
modules/ inline_form_errors/ src/ InlineFormErrorsServiceProvider.php, line 12
Namespace
Drupal\inline_form_errorsView source
class InlineFormErrorsServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$container
->getDefinition('form_error_handler')
->setClass(FormErrorHandler::class)
->setArguments([
new Reference('string_translation'),
new Reference('renderer'),
new Reference('messenger'),
]);
}
}