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.

Comments

woprrr’s picture

woprrr’s picture

woprrr’s picture

Status: Active » Needs review
woprrr’s picture

Status: Needs review » Needs work
woprrr’s picture

Status: Needs work » Needs review
StatusFileSize
new12.7 KB

Re-uploading to try and trigger a bot review.

woprrr’s picture

Continuing 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.

woprrr’s picture

Hummm 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 :)

woprrr’s picture

With the new version of IEF I recreate a patch.

woprrr’s picture

Status: Needs review » Closed (duplicate)

Close the benefit of a more suitable outcome @see https://www.drupal.org/node/2491527#comment-9940087

woprrr’s picture

Status: Closed (duplicate) » Closed (won't fix)