InlineFormErrorsServiceProvider::alter

public InlineFormErrorsServiceProvider::alter(ContainerBuilder $container)

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

core/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php, line 17

Class

InlineFormErrorsServiceProvider
Overrides the form_error_handler service to enable inline form errors.

Namespace

Drupal\inline_form_errors

Code

public function alter(ContainerBuilder $container) {
  $container->getDefinition('form_error_handler')
    ->setClass(FormErrorHandler::class)
    ->setArguments([new Reference('string_translation'), new Reference('link_generator'), new Reference('renderer')]);
}
doc_Drupal
2016-10-29 09:20:36
Comments
Leave a Comment

Please login to continue.