Now that we have the commerce_plugin_configuration form element (needed for the custom condition UI as well), most of the complexity/code of the PluginSelect form element is gone. #2885774: Remove the PluginItem/PluginSelect filtering by category will remove another big slice. Since we're not using the form element on any of our config entity forms (didn't turn out to be very practical), we might as well buy us some simplicity by merging what's left of the code back into the widget.

Comments

bojanz created an issue. See original summary.

  • bojanz committed a32d444 on 8.x-2.x
    Issue #2885775 by bojanz: Merge the PluginSelect form element into the...
bojanz’s picture

Status: Active » Fixed

Done.

joachim’s picture

Does this change the API for plugins that are intended to be referenced in fields of this type?

I saw in the latest beta code that plugins need to implement Drupal\Core\Plugin\PluginFormInterface to get a configuration form to show below the field.

I no longer see that check anywhere in the code in HEAD.

joachim’s picture

Status: Fixed » Active

I'm getting a crash for a missing method getConfiguration() -- is it the case that the field type expects plugins to implement ConfigurablePluginInterface? Should that be checked for?

bojanz’s picture

Status: Active » Fixed

Yes, plugin_select only supports plugins that implement ConfigurablePluginInterface (we never have or had one that doesn't).
Let's add that check in a separate issue (an exception thrown in buildForm()), no need to do it here.

Status: Fixed » Closed (fixed)

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