Problem/Motivation

This soft-blocks #2856950: Add a possibility to disable inline form errors for a complete form.

ElementInfoManagerInterface, unlike other plugin manager interfaces, does not extend anything.
Usually other plugin manager interfaces extend PluginManagerInterface, which in turn extends DiscoveryInterface, FactoryInterface, and MapperInterface.

Only DiscoveryInterface is relevant to ElementInfoManagerInterface, since the plugins should not be instantiated by outside code, only ::getInfo() and ::getInfoProperty() should be used.

However, implementations of hook_element_info_alter() may need to check the definitions of the element info. This would allow them to do so.

Proposed resolution

Make ElementInfoManagerInterface extend DiscoveryInterface

Remaining tasks

N/A

User interface changes

N/A

API changes

Strictly speaking yes, but with no real risk since as a plugin manager it should expose these methods.
And ElementInfoManager already extends PluginManagerBase.

Data model changes

N/A

CommentFileSizeAuthor
#2 2899082-element-2.patch659 bytestim.plunkett

Comments

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new659 bytes

Passing all of $definitions isn't feasible, I was thinking at first that the hook ran on each element type.

eclipsegc’s picture

Status: Needs review » Reviewed & tested by the community

Seems obvious and straight forward. RTBC assuming tests succeed.

Eclipse

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • xjm committed d317372 on 8.5.x
    Issue #2899082 by tim.plunkett: ElementInfoManagerInterface must extend...

  • xjm committed 704347b on 8.4.x
    Issue #2899082 by tim.plunkett: ElementInfoManagerInterface must extend...
xjm’s picture

Version: 8.5.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.5.x and 8.4.x. Thanks!

Status: Fixed » Closed (fixed)

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