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.
A use case for this is in #1808542: Allow area handlers to override the page title when used in an empty area.. Overriding the title only really makes sense to use as an empty area handler.
Think of how views_fetch_fields would fetch handlers for a base_table etc...
We could add this 'type' to the plugin definition or the views_data. If no type/types are specified, then any area handler should be assumed E.g. Text.
Questions
Where should we put the logic to filter this? Plugin manager level? after we have got the list of definitions or data?
Comment | File | Size | Author |
---|---|---|---|
#17 | views-1808670-17.patch | 4.04 KB | dawehner |
#15 | views-1808670-15.patch | 4.04 KB | dawehner |
#14 | views-1808670-14.patch | 4.05 KB | dawehner |
#9 | views-1808670-8.patch | 4.07 KB | dawehner |
#7 | 1808670-7.patch | 2.23 KB | damiankloip |
Comments
Comment #1
dawehnerWhat about something like this?
Comment #2
damiankloip CreditAttribution: damiankloip commentedYes something like this is kind of what I was thinking. I think this is the right stage to filter available handlers. How about we make it work for arrays too? I also changed the docs slightly. Hope that's ok.
Also, we don't have any tests for views_fetch_fields I don't think? It would be a good idea, as it's quite important.
Comment #3
damiankloip CreditAttribution: damiankloip commented@dawehner had a better idea of casting the value to an array and just checking that.
Comment #4
dawehnerLet's write a proper test coverage for this function #1809608: Write test coverage for views_fetch_fields
Comment #5
damiankloip CreditAttribution: damiankloip commentedtim suggested switching the $sub_type parameter to be last, let's do that.
Comment #6
dawehnerThen let's switch it :)
Comment #7
damiankloip CreditAttribution: damiankloip commentedAhaha
Comment #8
dawehnerHere is a test based on #1809608: Write test coverage for views_fetch_fields
Comment #9
dawehner.
Comment #11
dawehnerWell sure, the other patch didn't got in yet.
Comment #12
dawehner#9: views-1808670-8.patch queued for re-testing.
Comment #14
dawehnerJust a rerole.
Comment #15
dawehnerRerolled with a better assertion message.
Comment #16
damiankloip CreditAttribution: damiankloip commentedShould this be checking against the expected footer? $expected[$sub_type] instead?
Comment #17
dawehnerYou are totally right here, let's see whether this test run works fine as well.
Comment #18
damiankloip CreditAttribution: damiankloip commentedThat's better :)
Comment #19
dawehnerGreat, committed and pushed
Comment #20.0
(not verified) CreditAttribution: commentedUpdated issue summary.