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.
Problem/Motivation
Condition plugins were added to core before PluginFormInterface existed.
Its implementation of getFormId() is hacky and unnecessary.
Conditions have no real need to be configured on their own, the configuration has to be stored somewhere else.
Additionally, conditions are configurable, and should implement ConfigurablePluginInterface accordingly.
Proposed resolution
Update the interfaces
Remaining tasks
N/A
User interface changes
N/A
API changes
ConditionInterface implements PluginFormInterface instead of FormInterface, and also ConfigurablePluginInterface.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff.txt | 2.37 KB | tim.plunkett |
#5 | condition-plugin-forms-2268801-5.patch | 8.96 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettComment #3
tim.plunkettAh, there's that test coverage!
Comment #4
EclipseGc CreditAttribution: EclipseGc commentedThis seems straight forward and obvious.
Eclipse
Comment #5
tim.plunkettHmm, as much as it pains me to expand the scope, I'd rather do that than have another tiny issue.
Comment #6
jibranBack to RTBC.
Comment #7
webchickCommitted and pushed to 8.x. Thanks!
Comment #9
tim.plunkett