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.
Part of #2072251: [meta] Modernize forms to use FormBase
Updated: Comment #0
Problem/Motivation
Now that #2059245: Add a FormBase class containing useful methods is in, I was looking at old forms that have empty validateForm() methods, or still use Drupal::service() or t().
Proposed resolution
Convert existing FormInterface forms to extend FormBase
Remaining tasks
User interface changes
API changes
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#3 | user-2071481-3.patch | 54.17 KB | tim.plunkett |
#2 | user-2071481-2.patch | 59.75 KB | tim.plunkett |
#1 | user-2071481-1.patch | 14.76 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettComment #2
tim.plunkettBad regex.
Comment #3
tim.plunkettAccidentally included #2071439: Modernize config.module forms. Sloppy.
Comment #4
jibranThis is simple swap for
t
to$this->t
so I think it is safe to RTBC.Comment #5
alexpottCommitted 02a7ac8 and pushed to 8.x. Thanks!
Comment #6.0
(not verified) CreditAttribution: commentedAdd link to meta issue