Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#2059245: Add a FormBase class containing useful methods provides an easier way to define forms.
This issue is for going through existing forms and converting them.
Comments
Comment #0.0
tim.plunkettUpdated issue summary.
Comment #0.1
tim.plunkettUpdated issue summary.
Comment #0.2
tim.plunkettUpdated issue summary.
Comment #0.3
marcingy CreditAttribution: marcingy commentedAdd contact link
Comment #0.4
tim.plunketttaxo/forum
Comment #0.5
marcingy CreditAttribution: marcingy commentedAdd block ticket
Comment #0.6
marcingy CreditAttribution: marcingy commentedAdd shortcut
Comment #0.7
marcingy CreditAttribution: marcingy commentedAdd entity
Comment #0.8
alexanansi CreditAttribution: alexanansi commentedUpdated issue summary with test_ajax
Comment #0.9
alexanansi CreditAttribution: alexanansi commentedtypo
Comment #0.10
alexanansi CreditAttribution: alexanansi commentedUpdated issue summary.
Comment #0.11
alexanansi CreditAttribution: alexanansi commentedUpdated issue summary.
Comment #0.12
alexanansi CreditAttribution: alexanansi commentedadded links to new issues
Comment #0.13
alexanansi CreditAttribution: alexanansi commentedadded two new issue links
Comment #1
tim.plunkettComment #1.0
tim.plunkettAdded the custom_block module.
Comment #1.1
RoSk0Added issue with EntityConfirmFormBase https://drupal.org/node/2095681.
Comment #1.2
RoSk0Fixed token position for views_test_data module.
Comment #2
xjmAt first glance this does not seem like something that is in scope for 8.0.x anymore during the beta. Let's add a beta evaluation, and if appropriate, postpone the issue?
Reference: https://www.drupal.org/core/beta-changes | Contributor task:
Comment #3
xjmThese changes could be added to the next development minor, since form builders are considered internal. Surprised there are any of the old ones left though.
Comment #4
tim.plunkettPretty sure they're all using FormBase now, IIRC those issues are mostly just switching from
t()
to$this->t()
Comment #5
RoSk0Comment #6
alexpottDiscussed with @xjm. Given that #2059245: Add a FormBase class containing useful methods and #1946434: Convert all of confirm_form() in node.admin.inc and node.pages.inc to the new form interface have landed I think we should close this meta. The forms have been modernised. The current open patches that are doing
t()
to$this->t()
conversions. I think we need to adjust those issues scope and look for other related and duplicate issues - @xjm says that there is probably a deprecate t() issue. All t() usage in non-static methods in classes is suspect and should be removed. We need get a rule added to coder to find this and come up with a plan how to do all the work sensibly in core. For more on scope issues see https://www.drupal.org/core/scope for guidelines and examples. Doing this work piecemeal will mean it'll never get done and there's a high chance we'll introduce regressions.