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.
In #1535868: Convert all blocks into plugins, we did a straight port of the Views block integration.
With plugins and derivatives and all the new stuff, we'll want to revamp our code.
Specific things to target:
- The naming of \Drupal\views\Plugin\views\display\DisplayPluginBase::viewSpecialBlocks()
- The $type parameter of viewSpecialBlocks(), which is currently always 'exp' for exposed blocks
- Maybe make views_add_block_contextual_links() a method, or find a way to move that to contextual.module
Comment | File | Size | Author |
---|---|---|---|
#16 | vdc-1879256-16.patch | 3.51 KB | tim.plunkett |
#16 | interdiff.txt | 1.07 KB | tim.plunkett |
#13 | drupal-1879256-13.patch | 2.45 KB | dawehner |
#10 | interdiff.txt | 735 bytes | dawehner |
#10 | drupal-1879256-10.patch | 6.62 KB | dawehner |
Comments
Comment #1
xjmComment #2
xjmComment #3
dawehnerThere really seems no use-case for anything else then exposed forms, and if someone needs it, nothing prevents him from doing that in any kind of other custom code.
Comment #4
tim.plunkettThere's still a reference to special_block above views_add_block_contextual_links()
Comment #5
dawehnerGood point, thank you!
I would be really surprised if there would be test-coverage for these kind of blocks.
Comment #6
tim.plunkettI think the only thing left is #3 from the OP, making views_add_block_contextual_links() a method on ViewsBlock
Comment #7
dawehnerOh totally forgot that, did I talked about working at night before ;)
Comment #8
xjmComment #9
tim.plunkettRerolled.
Comment #10
dawehnerFixed some small bit.
As you didn't made any other suggestions is that RTBC?
Comment #11
tim.plunkettYes, I believe it is!
Comment #12
catchI'm surprised that Views has to check this for its own blocks, can they really be both?
Couldn't this use menu_get_item()?
Comment #13
dawehnerGood points, here is a new patch.
According to b261004a4825e1b6eb1398e849ef3729acd4de97 this went in, so this just changes this specific parts of it.
Comment #14
tim.plunkettOh hell yes, this patch removes two of my least favorite parts of Views :)
Comment #16
tim.plunkettAhh, when the drupal_render() is removed, it's not built fully.
This "fixes" it, but seems like overkill (those methods have an isset at the top of each in case they've run before, so its not too bad).
@dawehner, I hope you have better ideas :)
Comment #18
dawehner#16: vdc-1879256-16.patch queued for re-testing.
Comment #20
dawehnerThis has some good idea in there in general.
Comment #21
xjmSeems like this issue has taken a different turn since the original approach; can we update the summary? Also I'm not sure what the next step is here. I don't think it's novice since the last thing is @tim.plunkett saying doesn't know what to do. :)
Comment #26
tim.plunkettNot actively part of the Blocks-Layouts work.
Comment #36
quietone CreditAttribution: quietone at PreviousNext commentedThis was committed somewhere between comments #11 and #12. AFAICT all the items in the Issue Summary were completed in the original commit. That leaves the following work. Looking at the latest patch I believe all that work has happened in other issues, such as #788900: Deprecate and remove usages of arg().
Therefore, closing as outdated. If this is incorrect, create a new issue explaining what still needs to be done and add this one as a related issue.
Thanks!
Comment #37
quietone CreditAttribution: quietone at PreviousNext commentedNot a bug, removing bug smash tag.
Comment #38
quietone CreditAttribution: quietone at PreviousNext commentedI am full of errors at the moment. Closing as fixed.
If there really is something that didn't get done here, create a new issue and add this as related.
Thanks!