Block plugins have a hard dependency on block entities, making it impossible to reuse the block plugin system for blocks whose configurations are not stored in independent entities (for example, for ones stored inline into Panels layouts). We need to fix that so that block plugins only depend on a passed in configuration array: whether that configuration is stored in an independent entity or not should not be a concern for block plugin implementations, hook_block_view_alter(), or theme('block').
- Within the block CMI files, puts plugin-relevant configuration into a 'settings' key.
- Makes $block_entity->view() a very thin wrapper to $block_plugin->build(). Makes hook_block_view_alter() and theme('block') act only on the plugin, and not receive any entity information (except for a follow up needed for ).
- Moves visibility conditions (e.g., pages, roles) into the entity-level access controller.
- Reorganizes the entity's form controller and plugin's form methods to each be responsible for their respective settings.
In the process of moving block configuration to be configuration entities, I feel we ended up tightly coupling too much of the block system with a supporting entity structure, and we should fix that before we get too much further into feature freeze. This is a first patch that is designed to point the way. Ultimately Block Entities will end up as typed data and we'll not abuse the export properties method to get our data, but for the time being this works very nicely. I'm sure many many tests will fail or fatal on this.
update original blocks as plugins change notice... https://drupal.org/node/1880620
change notice (not sure if this is a todo for this issue)
|PASSED: [[SimpleTest]]: [MySQL] 55,505 pass(es). |
[ View ]
|FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. |
[ View ]