Problem/Motivation
The motivation for this issue is to make the two best widgets of the module store and limited the amount of code. To answer the following TODO "*TODO. - This Could Be shared with InlineEntityFormSingle Let's see if we". My idea is to place the methods in the base class and come InlineEntityFormSingle extend to enrich for the needs of the class InlineEntityFormMultiple.
A lot of code was duplicating the idea will be to share a maximum methods to be used in the various widget for IEF. the class.
Proposed resolution
Put all the basic methods in InlineEntityFormSingle and extend this class to avoid reproducing code already in place.
I have voluntary placed this patch in this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | inline_entity_form-refactor-FieldWidget-IEF-2489230-8.patch | 40.24 KB | woprrr |
Comments
Comment #1
woprrr commentedComment #2
woprrr commentedComment #3
woprrr commentedComment #4
woprrr commentedComment #5
woprrr commentedRe-uploading to try and trigger a bot review.
Comment #6
woprrr commentedContinuing with my refactoring, I also fixed a problem in the recovery of settings in case we define a different entity from the label referrer entity.
Also a fix within the settingsForm function re-call the inline_entity_form_get_controller () function unnecessary as initializeIefController () brings this controler. It would ensure create a real controller drupal8 eg src / Controller / InlineEntityFormController instead of inline_entity_form_get_controller ().
Here is the patch please, do not hesitate to test it.
Comment #7
woprrr commentedHummm a question joins this issue (in https://www.drupal.org/node/2475981#comment-9934898 ), please should define an action plan for the modules of the widget can be simplified and refactor. I could be wrong, but I do not have all the previous reflexions that led to the creation of two widgets. Help :)
Comment #8
woprrr commentedWith the new version of IEF I recreate a patch.
Comment #9
woprrr commentedClose the benefit of a more suitable outcome @see https://www.drupal.org/node/2491527#comment-9940087
Comment #10
woprrr commented