Problem/Motivation

After #2346273: Allow user to select bundles per entity type on field settings page we can re-factor autocomplete route to use the selection plugin and field settings to show the suggestion.

Proposed resolution

Re-factor autocomplete route

Remaining tasks

Create a patch

User interface changes

None

API changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jibran’s picture

Status: Active » Needs review
FileSize
10.97 KB

rewrite src/DynamicEntityReferenceController.php (70%)
It almost same as EntityReferenceController. I terms of security I love this patch cuz it improves a lot.
While working on this I realized two things:

  1. Consider adding enitity_id to route to further improve the security just like EntityReferenceController
  2. We need a unit test for DynamicEntityReferenceController
larowlan’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
16.4 KB

Looks good to me

  • jibran committed d072506 on 8.x-1.x
    Issue #2389599 by jibran, larowlan: Re-factor autocomplete route to use...
jibran’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review and testing. What you think about those two points in #1?

jibran’s picture

larowlan’s picture

I'm all for points in 1 and 2 if you're keen.

Status: Fixed » Closed (fixed)

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