Closed (fixed)
Project:
Per User Block
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2015 at 12:48 UTC
Updated:
20 Aug 2015 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
benjy commented* setContexts() is gone from the block entity so we don't override that anymore.
* I've replaced the EventSubscriber with the ContextProvider
TODO
* I can't see how the BlockContext is going to get the block that is being placed
* Need to review the cacheable dependencies to make sure it's working.
Comment #2
benjy commentedDiscussed with Berdir and he suggested a simplified approach using hook_block_access(). First attempt attached, which is indeed simpler.
Only thing to to check is the exclusion of block access in the admin, maybe that should be based on a new permission?
Comment #3
berdirIf you already specify the form structure within third_party_settings then you don't need a submit callback at all I think.
Comment #4
benjy commentedThanks Berdir, less code!
Comment #5
benjy commentedFinal patch attached, mainly just some simplifications in hook_block_access().
Comment #6
benjy commentedComment #7
benjy commentedDone.
Comment #13
benjy commentedNow it decides to test :/