Closed (fixed)
Project:
Block Class D8
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2015 at 23:40 UTC
Updated:
27 Feb 2015 at 17:24 UTC
Jump to comment: Most recent, Most recent file
Instead of storing the classes in a separate config file, we should use the third party settings.
Patch almost works. Only problem is that the main block doesn't go through hook_block_view_alter(), and the config block entity is not available in preprocess, which I'm not sure is the right thing to do.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | block_class-third-party-settings-2425675-3-interdiff.txt | 1.86 KB | berdir |
| #3 | block_class-third-party-settings-2425675-3.patch | 4.18 KB | berdir |
| #1 | block_class-third-party-settings.patch | 4.86 KB | berdir |
Comments
Comment #1
berdirComment #2
tim.plunkett$block = Block::load($variables['elements']['#id']);might work
In #1989568: Remove block config ID from being used as an HTML ID or template suggestion, some guy named Berdir removed the block config entity from persisting through to the entity_view hooks or preprocess :)
Comment #3
berdirYeah, I've heard of that guy ;)
That one did it to make page_manager work.
I guess loading it like that works, yes. That's essentially what the code before did as well, was hoping that I could avoid another load, but it's not that bad.
Comment #4
berdirCommitted.