autosave_form.services.yml in Autosave Form 8
File
autosave_form.services.yml
View source
- services:
- autosave_form.entity_form_storage:
- class: \Drupal\autosave_form\Storage\AutosaveEntityFormDatabaseStorage
- arguments: ['@database', '@serialization.phpserialize']
-
- form_validator.autosave_form:
- public: false
- class: \Drupal\autosave_form\Form\AutosaveFormValidator
- decorates: form_validator
- arguments: ['@form_validator.autosave_form.inner', '@request_stack', '@string_translation', '@csrf_token', '@logger.channel.form', '@form_error_handler']
- form_builder.autosave_form:
- public: false
- class: \Drupal\autosave_form\Form\AutosaveFormBuilder
- decorates: form_builder
- # The decorated autosave form builder should be the first applied as it
- # will not call further decorators, but directly override the core form
- # builder by extending from it and just calling the parent methods.
- decoration_priority: 10000
- 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']
- # Workaround for serializing decorated services. Remove when either
- # https://www.drupal.org/project/drupal/issues/2896993 or
- # https://www.drupal.org/project/drupal/issues/2531564 are fixed.
- properties: { _serviceId: form_builder }
- form_error_handler.autosave_form:
- public: false
- class: Drupal\autosave_form\Form\AutosaveFormErrorHandler
- decorates: form_error_handler
- arguments: ['@form_error_handler.autosave_form.inner']
-
- autosave_form.config_subscriber:
- class: Drupal\autosave_form\EventSubscriber\ConfigSubscriber
- tags:
- - { name: event_subscriber }
- arguments: ['@autosave_form.entity_form_storage']