sButtonLabel = $oDomNode->GetChildText('button-label'); // read child properties foreach ($oDomNode->GetUniqueElement('prototype')->childNodes as $oNode) { if ($oNode instanceof DesignElement) { $this->AddChild($oPropertyTreeFactory->CreateNodeFromDom($oNode, $this)); } } } public function ToPHPFormBlock(&$aPHPFragments = []): string { $sFormBlockClass = CollectionBlock::class; $sSubTreeClass = 'SubFormFor__'.$this->sIdWithPath; // Create the collection node $sLocalPHP = <<Add('$this->sId', '$sFormBlockClass', [ 'label' => '$this->sLabel', 'button_label' => '$this->sButtonLabel', 'block_entry_type' => '$sSubTreeClass', ]); PHP; $sSubClassPHP = <<aChildren as $oProperty) { $sSubClassPHP .= "\n".$oProperty->ToPHPFormBlock($aPHPFragments); } $sSubClassPHP .= <<