File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99class ChildRenderer extends AbstractRenderer
1010{
1111 public function all (
12- AbstractBlock $ parentBlock
12+ AbstractBlock $ parentBlock ,
13+ string $ blockAliasPrefix = '' ,
1314 ): string {
1415 $ html = '' ;
1516 $ childNames = $ parentBlock ->getChildNames ();
1617 $ children = [];
1718
1819 foreach ($ childNames as $ childName ) {
20+ if ($ blockAliasPrefix && 0 !== strpos ($ childName , $ blockAliasPrefix )) {
21+ continue ;
22+ }
23+
1924 $ childBlock = $ parentBlock ->getLayout ()->getBlock ($ childName );
2025 if (false === $ childBlock instanceof AbstractBlock) {
2126 if ($ this ->isDeveloperMode ()) {
@@ -32,6 +37,7 @@ public function all(
3237 $ sortedChildren = $ this ->sortBlocks ($ children );
3338
3439 foreach ($ sortedChildren as $ sortedChild ) {
40+ $ sortedChild ->setAncestorBlock ($ parentBlock );
3541 $ html .= $ sortedChild ->toHtml ();
3642 }
3743
You can’t perform that action at this time.
0 commit comments