Part of #2072251: [meta] Modernize forms to use FormBase

Updated: Comment #N

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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ivan Zugec’s picture

Status: Active » Needs review
FileSize
5.6 KB

Only LocaleSettingsForm.php had to be updated.

tim.plunkett’s picture

FileSize
2.9 KB
7.21 KB

Updated a couple other things

Status: Needs review » Needs work

The last submitted patch, 2: locale-2077985-2.patch, failed testing.

er.pushpinderrana’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
5.77 KB

Unable to apply above patch. Please review updated patch.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

The difference in size is replacing configFactory with the config() method which is already in HEAD.

amitgoyal’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
5.46 KB
195 bytes

I believe we don't really need to commit LocaleForm.php in this patch as it simply adds an empty line.

er.pushpinderrana’s picture

I think @amitgoyal, you took it in wrong way, as per drupal standard there should be a blank line after <?php tag, that was added in previous patch but removed in your patch.

And I think instead of adding new patch instantly, better to suggest through comment and let other people review it.

Thanks!

amitgoyal’s picture

Thanks for your advice @er.pushpinderrana! I know Drupal standards but I am following the advice from @dcam - https://www.drupal.org/node/1890980#comment-8946211.

This issue is not about fixing Drupal standards and we are committing 1 file just to add 1 extra line. We may fix Drupal standards and I believe there would be more in separate issue.

nielsonm’s picture

Status: Needs review » Fixed

This issue appears to have been resolved already.

Status: Fixed » Closed (fixed)

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