Problem/Motivation
D8 provides a class interface for managing an Entities forms. This is a useful mechanism in and of itself as it allows inheritance through form classes, something which may enhance development of forms in D7. If a functionally identical class interface were present in D7, it would facilitate the migration of code base for custom Entities to D8.
Proposed resolution
Port the following D8 Interfaces to D7 in modules/entity/includes/entity.forminterface.inc (developers could opt-in by calling module_load_include('inc', 'entity', 'entity.forminterface'):
Provide backports of the following Class implementations:
Remaining tasks
- Create file structure entity.forminterface.info and entity.forminterface.module
- Backport FormInterface
- Backport BaseFormIdInterface
- Backport EntityFormInterface
- Backport FormBase
- Backport EntityForm
- Create Test equivalent of ./tests/Drupal/Tests/Core/Entity/EntityFormTest.php
User interface changes
None.
API changes
None - this would be a class structure that would allow optional use.
Data model changes
None.
Original report by [username]
n/a
Comment | File | Size | Author |
---|---|---|---|
#4 | add-entityforminterface-d7-2632402_04.patch | 20.41 KB | robertwb |
Comments
Comment #2
robertwb CreditAttribution: robertwb commentedComment #3
robertwb CreditAttribution: robertwb commentedComment #4
robertwb CreditAttribution: robertwb commentedAttaching rough implementation structure: