wbraganca\dynamicform\DynamicFormWidget::removeItems PHP Method

removeItems() private method

Clear HTML widgetBody. Required to work with zero or more items.
private removeItems ( string $content )
$content string
    private function removeItems($content)
    {
        $crawler = new Crawler();
        $crawler->addHTMLContent($content, \Yii::$app->charset);
        $crawler->filter($this->widgetItem)->each(function ($nodes) {
            foreach ($nodes as $node) {
                $node->parentNode->removeChild($node);
            }
        });
        return $crawler->html();
    }