@@ -57,9 +57,7 @@ public function enrichNodeTypeLabelsConfiguration(JoinPointInterface $joinPoint)
5757 $ declaredSuperTypes = $ joinPoint ->getMethodArgument ('declaredSuperTypes ' );
5858 $ configuration = $ joinPoint ->getMethodArgument ('configuration ' );
5959 $ nodeTypeName = $ joinPoint ->getMethodArgument ('name ' );
60-
6160 $ this ->addLabelsToNodeTypeConfiguration ($ nodeTypeName , $ configuration , $ declaredSuperTypes );
62-
6361 $ joinPoint ->setMethodArgument ('configuration ' , $ configuration );
6462 $ joinPoint ->getAdviceChain ()->proceed ($ joinPoint );
6563 }
@@ -79,6 +77,26 @@ protected function addLabelsToNodeTypeConfiguration($nodeTypeName, array &$confi
7977 if (isset ($ configuration ['properties ' ])) {
8078 $ this ->setPropertyLabels ($ nodeTypeName , $ configuration , $ declaredSuperTypes );
8179 }
80+
81+ if (isset ($ configuration ['childNodes ' ])) {
82+ $ this ->setChildNodeLabels ($ nodeTypeName , $ configuration );
83+ }
84+ }
85+
86+
87+ /**
88+ * @param string $nodeTypeName
89+ * @param array $configuration
90+ * @return void
91+ */
92+ protected function setChildNodeLabels (string $ nodeTypeName , array &$ configuration )
93+ {
94+ $ nodeTypeLabelIdPrefix = $ this ->generateNodeTypeLabelIdPrefix ($ nodeTypeName );
95+ foreach ($ configuration ['childNodes ' ] as $ childNodeName => &$ childNodeConfiguration ) {
96+ if ($ childNodeConfiguration && $ this ->shouldFetchTranslation ($ childNodeConfiguration )) {
97+ $ childNodeConfiguration ['label ' ] = $ this ->getChildNodeLabelTranslationId ($ nodeTypeLabelIdPrefix , $ childNodeName );
98+ }
99+ }
82100 }
83101
84102 /**
@@ -300,6 +318,18 @@ protected function getPropertyLabelTranslationId($nodeTypeSpecificPrefix, $prope
300318 return $ nodeTypeSpecificPrefix . 'properties. ' . $ propertyName ;
301319 }
302320
321+ /**
322+ * Generates a childNode label with the given $nodeTypeSpecificPrefix.
323+ *
324+ * @param string $nodeTypeSpecificPrefix
325+ * @param string $childNodeName
326+ * @return string
327+ */
328+ protected function getChildNodeLabelTranslationId (string $ nodeTypeSpecificPrefix , string $ childNodeName )
329+ {
330+ return $ nodeTypeSpecificPrefix . 'childNodes. ' . $ childNodeName ;
331+ }
332+
303333 /**
304334 * Generates a property configuration-label with the given $nodeTypeSpecificPrefix.
305335 *
0 commit comments