public function __construct(
protected HtmlDocument $doc,
protected Closure $pageContentForId,
public function __construct(
protected HtmlDocument $doc,
protected Closure $pageContentForId,
- $htmlContent = $this->pageContentForId->call($this, $tag->getPageId());
- $content = new PageIncludeContent($htmlContent, $tag);
+ /** @var PageIncludeContent $content */
+ $content = $this->pageContentForId->call($this, $tag);
foreach ($node->childNodes as $childNode) {
if ($childNode->nodeName === '#text') {
array_push($includeTags, ...$this->splitTextNodesAtTags($childNode));
foreach ($node->childNodes as $childNode) {
if ($childNode->nodeName === '#text') {
array_push($includeTags, ...$this->splitTextNodesAtTags($childNode));
$parentNode->parentNode->insertBefore($parentClone, $parentNode);
$parentClone->removeAttribute('id');
$parentNode->parentNode->insertBefore($parentClone, $parentNode);
$parentClone->removeAttribute('id');