Closed (fixed)
Project:
Examples for Developers
Version:
8.x-1.x-dev
Component:
Field Example
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Sep 2012 at 12:45 UTC
Updated:
22 Jun 2014 at 21:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rfayExcellent... However, first the Field Example will have to be ported to D8 to begin with. It's OK if this issue prompts that, as long as things have stabilized enough.
Comment #2
mile23We've got #1229322: hook_field_access example/explanation and #1293104: 3text field validation fundamentally flawed in the way.
I'm poking around on the former.
I'd say we need to wait until at least feature freeze on D8 before making examples. Unless of course any of the D8 devs want to start the ball rolling on their respective APIs. :-)
Comment #3
mile23Marking as postponed for now: #1861598: Examples for Drupal 8 needs relatively stable feature set
Please continue development and discussion as desired.
Comment #4
mile23Comment #5
mile23Comment #6
kerasai commentedHi folks,
Attached it is a first shot at field_examples implemented in D8. It'a pretty much just a straight port of the D7 functionality in the shiny, new D8 ecosystem. This should be pretty close, please take a look and provide feedback.
Things that definitely still need to be addressed:
Also, I'm pushing into a repo on Github for my own convenience. https://github.com/kerasai/drupal-examples/tree/8.x-1.x-field_example if anyone is interested.
Comment #7
kerasai commentedForgot to add in the page that the module provided which had some info about the example. Now included.
Comment #8
marvil07 commentedPatch does not contains the original test.
Following a patch adding them, not finished tough.
Also, based on not having the test, I would suggest to do a full review comparing with D7 version.
Comment #9
marvil07 commentedNew changes on this
commitpatch:Comment #10
marvil07 commentedSorry I added the wrong patch, last one was the interdiff.
Re-uploading what is mentioned on last comment.
Comment #12
Enxebre commentedHi,
Renaming folders according core modules (FieldFormatter, FieldWidget, FieldType )
Fixing values passed to viewElements method.
Fixing use of wrong namespaces
Using \Drupal::formBuilder()->setValue and \Drupal::formBuilder()->setError instead of old deprecated functions.
Comment #13
Enxebre commentedComment #16
Enxebre commentedComment #17
mile23Comment #18
mile23This patch (mostly) works in the UI now. The tests still don't pass, and I assume the validation routines are still not happening.
Comment #21
spiffl commentedmade some changes to make it work on alpha10.
Comment #22
spiffl commentedfixed the issue in colorpicker that the jquery-class-name was not assigned anymore and cleanup up coding standard errors.
Comment #25
spiffl commentedincorporated latest API Changes from drupal HEAD + moved comon test-baseclass outsite the Tests-namespace
Comment #27
spiffl commentedexamples-field_example-1796606-23.patch is ready for a review
Comment #29
mile23If you name your interdiff with .txt as the extension, the testbot will ignore it.
Seems like the documentation is still out of date...
See: #2223291: Change all hook_menu() implementations to *.menu_links.yml files, add tests
Comment #30
mile23Comment #31
spiffl commentedBoth points from #29 are now adapted + both validate functions are now moved to the Widget classes.
Comment #32
spiffl commentedComment #34
mile2331: examples-field_example-1796606-31.patch queued for re-testing.
Comment #35
mile23PSR-4, coding standards... interdiff from #31.
This is pretty close.
Comment #37
mile23Committed! http://cgit.drupalcode.org/examples/commit/?h=8.x-1.x&id=41768a807882f7e...
Thanks, everyone, and especially kerasai for getting the ball rolling.