Goose\Modules\Formatters\OutputFormatter::convertLinksToText PHP Метод

convertLinksToText() приватный Метод

cleans up and converts any nodes that should be considered text into text
private convertLinksToText ( DOMWrap\Element $topNode )
$topNode DOMWrap\Element
    private function convertLinksToText(Element $topNode)
    {
        if (!empty($topNode)) {
            $links = $topNode->find('a');
            foreach ($links as $item) {
                $images = $item->find('img');
                if ($images->count() == 0) {
                    $item->replaceWith(new Text(Helper::textNormalise($item->text())));
                }
            }
        }
    }