Part of #1971384: [META] Convert page callbacks to controllers.
For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.
Related issues
#1946426: Convert all of confirm_form() in language.admin.inc to the new form interface
#2031277-11: Implement checkCreateAccess on LanguageAccessController
Comment | File | Size | Author |
---|---|---|---|
#34 | 2003592-lang-add-34.patch | 23.28 KB | andypost |
#30 | interdiff.txt | 8.19 KB | andypost |
#30 | 2038291-lang-add-30.patch | 23.28 KB | andypost |
#29 | interdiff.txt | 9.09 KB | andypost |
#29 | 2038291-lang-add-29.patch | 15.09 KB | andypost |
Comments
Comment #1
mhagedon CreditAttribution: mhagedon commentedGetting started on this shortly...
Comment #2
mhagedon CreditAttribution: mhagedon commentedTo get the UI for this, get the patch from #1952394: Add configuration translation user interface module in core.
Comment #3
mhagedon CreditAttribution: mhagedon commentedHere's a partial patch. It'll fail testing, but on top of that the functional tests are blocked by #1952394: Add configuration translation user interface module in core. Next step is probably to figure out how best to populate the Language object in buildForm. Not marking "needs review" since it will fail.
Comment #4
Gábor HojtsyComment #5
Gábor HojtsyBTW I don't see how #1952394: Add configuration translation user interface module in core would be any related...
Comment #7
PanchoRather this one partly depends on #2005778: Convert language_admin_overview_form to a Controller.
Also, this one and #2038291: Convert language_admin_add_form to a Controller are heavily interdepending, so we need to refactor the logic from composition to inheritance. Well, we don't necessarily have to - both have their merits even in OOP -, but it would make the code cleaner plus improve the experience with JS being disabled.
So I started a patch that should be CNR by tomorrow, if I find time finishing it. Hope it's okay with @mhagedon if I reassign this to me until Sunday or so.
Comment #8
penyaskito#2005778: Convert language_admin_overview_form to a Controller landed, including LanguageAccessController.
Comment #9
webflo CreditAttribution: webflo commentedThis patch adds a new LanguageFormController. Maybe we should postpone #2038291: Convert language_admin_add_form to a Controller?
Comment #11
PanchoToo bad, this seriously has been double work. :(
It's not been without reason that I said I'm assigning to this until Sunday.
Comment #12
Gábor HojtsyAdd API change tags.
Comment #13
PanchoOuch, finishing my patch is overdue. I'm sorry, it will be my next task for today.
Postponed #2038291: Convert language_admin_add_form to a Controller on this one here.
Comment #14
Gábor Hojtsy@Pancho, @webflo, still working on this one?
Comment #15
andypostClosed as duplicate #2038291: Convert language_admin_add_form to a Controller
Both forms have common part so needs base class like image styles uses.
Also I'm not sure that there's api change because
_language_admin_common_controls()
is not API function so should be moved to the base class.Suppose the names should be:
Form/LanguageAddForm
+Form/LanguageEditForm
inherited from abstractForm/LanguageFormBase
with corresponding inhected services by implementingEntityControllerInterface
And require #2031277-11: Implement checkCreateAccess on LanguageAccessController
Comment #16
andypostSuppose approach should be different, initial patch
Comment #18
andypostAnother attempt, in chrome html5 validation still disallow submit predefined language
Comment #20
andypostFix some test failures, still can't fix #states for predefined language in chrome
Comment #22
andypostRemoved standard actions
Renamed validation
a bit of clean-up
Comment #23
andypostTagging because hidden #state does not allows to submit Add form by mouse, but "space-button" works.
Also this works before conversion
PS: chrome 30.0.1599.10 dev
Comment #24
tim.plunkettThis is not a proper use of parent::, it should be something like
$form = $this->addCommonFormElements($form, $form_state);
This doesn't make much sense to me.
This should have used t() until FormBase was in.
Why isn't this just validateForm()?
Comment #25
andypostFixed translator
Comment #26
dawehnert() could be just replaced by $this->t() in this patch.
Let's set the #title on the render array.
Comment #27
andypostThere's a conceptual question here - old code and currently used functions operates on Language object not the language entity.
So should we build the forms on top of the language entity... for me it seems weird (the difference in label vs name properties)
Language entity faked with 'name' form element so
language_save()
could continue to work and form structure is not changedComment #28
Gábor HojtsyYeah the add form and edit form edit/add entities, they should be entity form controllers as for any other config entity.
Comment #29
andypostRe-roll for
$this->t()
and#title
Related #1946426: Convert all of confirm_form() in language.admin.inc to the new form interface uses entity too
Comment #30
andypostMissed the removal of old code
Comment #31
xjmThanks for your work on this issue! Please see #1971384-43: [META] Convert page callbacks to controllers for an update on the routing system conversion process.
Comment #32
disasm CreditAttribution: disasm commentedThis one looks great and passes tests! Marking RTBC!
Comment #33
Gábor HojtsyAgreed, let's get this in!
Comment #34
andypostre-roll
Comment #35
webchickCommitted and pushed to 8.x. Thanks!
Comment #36
Gábor HojtsyYay, thanks!
Comment #37
Gábor HojtsyThanks all!
Comment #38
Gábor HojtsyYay, thanks all!
Comment #40
Gábor HojtsyThanks all!
Comment #40.0
Gábor HojtsyUpdated issue summary.