Problem/Motivation

In \Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormComplex::formElement, we have

    $this->setIefId(Crypt::hashBase64(implode('-', $parents)));

Also, we have that formula in 3 other palces.

Proposed resolution

Abstract that out into ::makeIefId().

Remaining tasks

* Code, test, commit.
* In a followup, make a CR and notification issues for modules subclassing InlineEntityFormBase. (A code search only shows 1 module*)

User interface changes

None.

API changes

Formally, none.

Draft CR:
Subclasses of InlineEntityFormBase must use makeIefId() to create the Id, to profit from future bugfixes depending on this.

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

geek-merlin created an issue. See original summary.

geek-merlin’s picture

geek-merlin’s picture

Issue summary: View changes

geek-merlin’s picture

Status: Active » Fixed

As expected all green and nothing breaks from this simple refactoring, so merging. Tiny steps forward.

  • geek-merlin committed 0294fca on 8.x-1.x
    Issue #3203941 by geek-merlin: DRY up creation of $iefId
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.