@@ 40-46 (lines=7) @@ | ||
37 | $children[$position] = null; |
|
38 | ||
39 | //Pass through all current WidgetMap children for a given position |
|
40 | foreach ($widgetMap->getContextualChildren($position) as $_child) { |
|
41 | //If child don't have a substitute for this View and Templates, this is the one |
|
42 | if (null === $_child->getSubstituteForView($view)) { |
|
43 | $children[$position] = $_child; |
|
44 | $matchingChildren[] = $_child->getId(); |
|
45 | } |
|
46 | } |
|
47 | ||
48 | //If children has not been found for this position |
|
49 | //and current WidgetMap is a substitute |
|
@@ 52-58 (lines=7) @@ | ||
49 | //and current WidgetMap is a substitute |
|
50 | if (!$children[$position] && $widgetMap->getReplaced()) { |
|
51 | //Pass through all replaced WidgetMap children for a given position |
|
52 | foreach ($widgetMap->getReplaced()->getContextualChildren($position) as $_child) { |
|
53 | //If child don't have a substitute for this View and Templates, this is the one |
|
54 | if (null === $_child->getSubstituteForView($view)) { |
|
55 | $children[$position] = $_child; |
|
56 | $matchingChildren[] = $_child->getId(); |
|
57 | } |
|
58 | } |
|
59 | } |
|
60 | ||
61 | $matchingChildren = array_unique($matchingChildren); |