Problem/Motivation

DateTimeDefaultWidget contains a todo to this issue

Proposed resolution

Resolve @todo

Original report by @dawehner

#2034563: Switch field plugin managers to DefaultPluginManager

For all the logic needed in the current container factory maybe the createInstance method on the widget plugin manager should be different.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

There was once a FormatterFactory too, which IIRC @tim.plunkett removed in the same patch that introduced the @FieldFormatter plugin annotation.
So maybe similarly this could be done in #2035315: Add a dedicated @FieldWidget annotation ?

yched’s picture

Issue tags: +Field API

tagging

andypost’s picture

is this issue still valid?

yched’s picture

Status: Active » Closed (duplicate)
andypost’s picture

Issue summary: View changes
Status: Closed (duplicate) » Needs review
FileSize
804 bytes

There's @todo left

Berdir’s picture

Shouldn't we actually inject it then instead of just removing the @todo? Also, that @todo just says inject once this issue is in, so this issue was a blocker for that but there's no reason to do re-open this issue?

Status: Needs review » Needs work

The last submitted patch, 5: 2035317-5.patch, failed testing.

andypost’s picture

@berdir so file new issue? suppose there's no reason to inject EM here, ince there's a method

andypost’s picture

Status: Needs work » Needs review

5: 2035317-5.patch queued for re-testing.

andypost’s picture

Title: Switch widget factory to container factory » DateTimeDefaultWidget should implement ContainerFactoryPluginInterface
Issue summary: View changes
FileSize
2.11 KB

Proper title and summary -we need to resolve @todo

andypost’s picture

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Still think this should have been a different issue, I'm sure there are other formatters and widgets that use global services too that are simply missing a corresponding @todo.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 2035317-10.patch, failed testing.

hussainweb’s picture

FileSize
2.23 KB

I am rerolling the patch. There were conflicts from #2005434: Let 3rd party modules store extra configuration in EntityDisplay.

@Berdir, I will see if I can find more such widgets and create issues.

hussainweb’s picture

Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c679460 and pushed to 8.x. Thanks!

  • alexpott committed c679460 on 8.x
    Issue #2035317 by andypost, hussainweb | dawehner: DateTimeDefaultWidget...

Status: Fixed » Closed (fixed)

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