Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / inline_form_errors / src / InlineFormErrorsServiceProvider.php
1 <?php
2
3 namespace Drupal\inline_form_errors;
4
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\Core\DependencyInjection\ServiceProviderBase;
7 use Symfony\Component\DependencyInjection\Reference;
8
9 /**
10  * Overrides the form_error_handler service to enable inline form errors.
11  */
12 class InlineFormErrorsServiceProvider extends ServiceProviderBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function alter(ContainerBuilder $container) {
18     $container->getDefinition('form_error_handler')
19       ->setClass(FormErrorHandler::class)
20       ->setArguments([
21         new Reference('string_translation'),
22         new Reference('link_generator'),
23         new Reference('renderer'),
24         new Reference('messenger'),
25       ]);
26   }
27
28 }