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.
This currently derives from EntityConfirmFormBase. EntityDeleteForm might be better, as it might do more for us?
Comment | File | Size | Author |
---|---|---|---|
#3 | flagDelete-2617210-3.patch | 1.59 KB | martin107 |
|
Comments
Comment #2
martin107 CreditAttribution: martin107 commentedIf we do we can remove 3 methods which do not need to deviate from the standard form.
Comment #3
martin107 CreditAttribution: martin107 commentedI have removed
getConfirmText()
getQuestion()
submitForm()
I have manually test it ... it looks ok.
BUT
If any tests look out for our non-standard old text ... then there will be tears before bedtime.
Comment #4
joachim CreditAttribution: joachim commented> If any tests look out for our non-standard old text ... then there will be tears before bedtime.
Hmm it would seem we don't have any test coverage for flag deletion...
Comment #5
joachim CreditAttribution: joachim commentedThanks for the patch!
Looks good to me.
Tried the patch. The only change I can see is that it says:
> Are you sure you want to delete the flag Foo?
instead of:
> Are you sure you want to delete the Flag Foo?
Which is fine. Core says 'vocabulary' in lower case and without emphasis, and we should switch to doing the same for 'flag'.
Will commit later.
Comment #6
martin107 CreditAttribution: martin107 commentedThis is of no consequence
BUT looking at getConfirmText()
The other change is "Delete" becomes "Confirm" - which is ok by me.
Comment #7
joachim CreditAttribution: joachim commentedThe button on the actual form still says 'Delete'.
Comment #8
joachim CreditAttribution: joachim commentedAh, yup: in \Drupal\Core\Entity\EntityDeleteFormTrait:
Comment #10
joachim CreditAttribution: joachim commentedCommitted. Thanks again!