You are here

autosave_form.services.yml in Autosave Form 8

File

autosave_form.services.yml
View source
  1. services:
  2. autosave_form.entity_form_storage:
  3. class: \Drupal\autosave_form\Storage\AutosaveEntityFormDatabaseStorage
  4. arguments: ['@database', '@serialization.phpserialize']
  5. form_validator.autosave_form:
  6. public: false
  7. class: \Drupal\autosave_form\Form\AutosaveFormValidator
  8. decorates: form_validator
  9. arguments: ['@form_validator.autosave_form.inner', '@request_stack', '@string_translation', '@csrf_token', '@logger.channel.form', '@form_error_handler']
  10. form_builder.autosave_form:
  11. public: false
  12. class: \Drupal\autosave_form\Form\AutosaveFormBuilder
  13. decorates: form_builder
  14. # The decorated autosave form builder should be the first applied as it
  15. # will not call further decorators, but directly override the core form
  16. # builder by extending from it and just calling the parent methods.
  17. decoration_priority: 10000
  18. arguments: ['@form_builder.autosave_form.inner', '@form_validator', '@form_submitter', '@form_cache', '@module_handler', '@event_dispatcher', '@request_stack', '@class_resolver', '@element_info', '@theme.manager', '@?csrf_token', '@autosave_form.entity_form_storage']
  19. # Workaround for serializing decorated services. Remove when either
  20. # https://www.drupal.org/project/drupal/issues/2896993 or
  21. # https://www.drupal.org/project/drupal/issues/2531564 are fixed.
  22. properties: { _serviceId: form_builder }
  23. form_error_handler.autosave_form:
  24. public: false
  25. class: Drupal\autosave_form\Form\AutosaveFormErrorHandler
  26. decorates: form_error_handler
  27. arguments: ['@form_error_handler.autosave_form.inner']
  28. autosave_form.config_subscriber:
  29. class: Drupal\autosave_form\EventSubscriber\ConfigSubscriber
  30. tags:
  31. - { name: event_subscriber }
  32. arguments: ['@autosave_form.entity_form_storage']