Basic converter and test
1 open thread
Closes #3498005
Merge request reports
Activity
added 21 commits
-
444d730f...437bf974 - 14 commits from branch
project:3.x - 0248cd15 - improve comments
- aa7da4e9 - make column tests basically work
- c2345823 - implement block components
- 23ba1883 - Merge remote-tracking branch 'origin/3.x' into 3498005-xb-render-converter
- f8d059a1 - Merge remote-tracking branch 'origin/3.x' into 3498005-xb-render-converter
- 0fe46c5a - restructure traits
- c1002ff8 - add support for rendering blocks from within XB
Toggle commit list-
444d730f...437bf974 - 14 commits from branch
mentioned in merge request !116 (closed)
15 * Converts a single block render array to a custom element. 16 * 17 * @param array $block_build 18 * The block render array. 19 * @param \Drupal\Core\Cache\RefinableCacheableDependencyInterface|null $cache_metadata 20 * Optional object to attach cache metadata to when the block is 21 * empty (cache-only). Pass this to ensure cache metadata from empty 22 * blocks is not lost. 23 * 24 * @return \Drupal\custom_elements\CustomElement|null 25 * The custom element, or NULL if the block is empty and cache metadata 26 * was attached to the provided cache metadata object. 27 */ 28 public function convertBlockRenderArray(array $block_build, ?RefinableCacheableDependencyInterface $cache_metadata = NULL): ?CustomElement { 29 // Handle empty cache-only entries. 30 if (isset($block_build['#cache']) && count($block_build) == 1) {
Please register or sign in to reply