auto-append footer slot marker into <body>
@param $node
@return string
498232
public function _body($node) {
		$params = '';
		if (isset($node['@attrib'])) {
			$params = $this->resolveAttr($node['@attrib']);
			unset($node['@attrib']);
		}
		$content = array();
		// bypass inner content nodes
		foreach ($node as $el)
			$content[] = $this->template->build($el);
		return '<body'.$params.'>'.implode("\n", $content)."\n".
			$this->render('footer')."\n".'</body>';
	}
466917
protected static function getInnerHTML($node) {
		if(!$node)
			return null;
		$innerHTML= ''; 
		$children = $node->childNodes; 
		foreach ($children as $child)
			$innerHTML .= $child->ownerDocument->saveHTML($child);
		return $innerHTML; 
	}
911071
protected function transpileSanitizedTagNode(Node $node) : string
    {
        $code = '';

        foreach ($node->getChildren() as $childNode) {
            $code .= '<?php echo $__opulenceFortuneTranspiler->sanitize(' . $childNode->getValue() . '); ?>';
        }

        return $code;
    }
519276
public function append(Node $node)
    {

        if (!is_array($this->_children)) {
            $this->_children = [];
        }

        $this->_children[] = $node;
        return $this;
    }
61275
protected function getNextSiblingOfTypeDOMElement(\DOMNode $node)
    {
        do {
            $node = $node->nextSibling;
        } while (!($node === null || $node instanceof \DOMElement));

        return $node;
    }
357588
static protected function get_cell_list(\DOMNode $node)
    {
        $xpath = new \DOMXpath($node->ownerDocument);

        switch ($node->nodeName) {
            default:
            case "table":
                $query = "tr/td | thead/tr/td | tbody/tr/td | tfoot/tr/td | tr/th | thead/tr/th | tbody/tr/th | tfoot/tr/th";
                break;

            case "tbody":
            case "tfoot":
            case "thead":
                $query = "tr/td | tr/th";
                break;

            case "tr":
                $query = "td | th";
                break;
        }

        return $xpath->query($query, $node);
    }
1016841
private function generateTmlTags($node) {
        $buffer = "";
        foreach($node->childNodes as $child) {
            if ($child->nodeType == 3) {                    // text node
                $buffer = $buffer . $child->wholeText;
            } else {
                $buffer = $buffer . $this->generateTmlTags($child);
            }
        }

        $token_context = $this->generateHtmlToken($node);
        $token = $this->adjustName($node);
        $token = $this->contextualize($token, $token_context);

        $value = $this->sanitizeValue($buffer);

        if ($this->isSelfClosingNode($node))
            return '{'.$token.'}';

        if ($this->isShortToken($token, $value))
            return '['.$token.': '.$value.']';

        return '['.$token.']'.$value.'[/'.$token.']';
    }
784206
protected function getCustomTagContent(DOMNode $node)
    {
        $xmlString = '';

        /** @var \DOMNode $child */
        foreach ($node->childNodes as $child) {
            $xmlString .= $node->ownerDocument->saveXML($child);
        }

        return $xmlString;
    }
835154
protected function getRelevantNodeText($node)
    {
        if (!$node->hasChildNodes()) {
            return $node->innertext();
        }

        $output = '';
        foreach ($node->nodes as $child) {
            /* @var $child \simple_html_dom_node */
            if (!$child->hasChildNodes()) {
                $output .= $child->outertext();
            } elseif (in_array($child->nodeName(), static::$listContentTags, true)) {
                $output .= sprintf('<%1$s>%2$s</%1$s>', $child->nodeName(), $this->getRelevantNodeText($child));
            }
        }

        return $output;
    }
694073
private function bootstrapBreadcrumb(NavigationNode $node, $last) {

        $attributes = true === $node->getActive() && true === $last ? ["class" => "active"] : [];

        $content   = $this->getTranslator()->trans($node->getId());
        $innerHTML = true === $last ? $content : static::coreHTMLElement("a", $content, ["href" => $node->getUri()]);

        return static::coreHTMLElement("li", $innerHTML, $attributes);
    }
1270203
public function transform($node)
    {
        $blocksData = $this->transformBlock($node);
        $documentData = array(
            'id' => $node->getNodeId() . '-' . $node->getLanguage(). '-' . $node->getSiteId(),
            'elementId' => $node->getId(),
            'nodeId' => $node->getNodeId(),
            'siteId' => $node->getSiteId(),
            'language' => $node->getLanguage(),
            'name' => $node->getName(),
            'blocks' => $blocksData
        );

        if (!is_null($node->getUpdatedAt())) {
            $documentData['updatedAt'] = $node->getUpdatedAt()->getTimestamp();
        }

        $document = new Document($documentData['id'], $documentData);

        return $document;
    }
1029726
public function enterNode(Node $node)
    {
        if ($node instanceof Stmt\Namespace_) {
            $this->cancelNext = true;
            $this->namespaceNode = $node->name;
        } elseif ($node instanceof Stmt\GroupUse) {
            $this->cancelNext = true;
            $this->groupImport = $node->prefix;
            foreach ($node->uses as $use) {
                $this->importNodes[] = Name::concat($node->prefix, $use->name);
            }
        } elseif ($node instanceof Stmt\Use_) {
            foreach ($node->uses as $use) {
                $this->importNodes[] = $use->name;
            }
        } elseif ($node instanceof Stmt\UseUse) {
            $this->isImport = true;
        } elseif ($node instanceof Expr\FuncCall) {
            $this->cancelNext = true;
        } elseif ($node instanceof Expr\ConstFetch) {
            $this->cancelNext = true;
        } elseif ($node instanceof Expr\StaticCall) {
            $this->cancelNext = true;
        } elseif ($node instanceof Expr\StaticPropertyFetch) {
            $lc = strtolower($node->class->toString());
            if (in_array($lc, ['static', 'self', 'parent'])) {
                $this->cancelNext = true;
            }
        } elseif ($node instanceof Expr\ClassConstFetch) {
            $lc = strtolower($node->class->toString());
            if (in_array($lc, ['static', 'self', 'parent'])) {
                $this->cancelNext = true;
            }
        } elseif ($node instanceof Expr\New_) {
            if ($node->class && $node->class instanceof Name) {
                $lc = strtolower($node->class->toString());
                if (in_array($lc, ['static', 'self', 'parent'])) {
                    $this->cancelNext = true;
                }
            }
        }
    }
433658
function copy(DomNode $node) {
    $deco = parent::copy($node);
    
    // In order to keep columns' widths through pages
    $deco->_cellmap->set_columns($this->_cellmap->get_columns());
    $deco->_cellmap->lock_columns();

    return $deco;
  }
1343337
protected static function createContentLink($node)
    {
        static::_prepare();
        $url = false;

        // node with external/internal link: get URL from 'route' field
        if (empty($node->text) && !empty($node->route)) {
            $url = static::routeToLink($node->route);
        }

        // site tree content node: create URL for node from visible site tree if this node has original route
        if ($url === false) {
            $url = Url::toRoute([static::$_routeActionView, 'id' => $node->id]);
            $parts = parse_url($url);
            if (!empty($parts['path'])) {
                $url = $parts['path'];
                if (strstr($url, static::$_routeActionView)) { // it's fake link contain action UID and GET-parameter "id={$id}"
                    $url = false;
                }
            }
        }

        // node has content but any links yet: create URL for node out of visible site tree (submenu tree)
        if ($url === false && empty($node->route) && !empty($node->text)) {
            $url = Url::toRoute([static::$_routeActionShow, 'id' => $node->id, 'slug' => $node->slug]);
        }

        return $url;
    }
674651
public function leaveNode(Node $node)
    {
        if ($node instanceof Class_) {
            // Build params
            $params = [];
            $paramComments = '';
            foreach ($this->params as $param) {
                if (is_array($param)) {
                    $params[] = isset($param['type']) && isset($param['name'])
                        ? new Param($param['name'], null, new Name([$param['type']]))
                        : new Param($param[0]);
                } else {
                    $params[] = new Param($param);
                }
                $paramComments .= '    * @param '
                    .(isset($param['type']) ? $param['type'] : 'mixed')
                    .' $'.(isset($param['name']) ? $param['name'] : $param)."\n";
            }
            if (count($params) > 0)
                $paramComments = '     *'."\n".$paramComments;
            // ADD statement
            $node->stmts[] = new ClassMethod(
                preg_replace('/\-\./', '_', $this->methodName),
                [
                    'type'      => 1,
                    'params'    => $params,
                ],
                [
                    'comments'  => [new Comment(sprintf(
                        '/**'."\n"
                            . (empty($this->comment) ? '' : '    * '.$this->comment."\n")
                            .'     * Ayuco: addition %s'."\n"
                            .'     * @since fill'."\n"
                            .$paramComments
                            .'     *'."\n"
                            .'     * @return'."\n"
                            .'     */',
                        date('Y-m-d h:i a'))
                    )]
                ]
            );
        }
    }
92208
protected function getSpecialPageList($node)
    {
        $siteId = $this->contextManager->getSiteId();
        $language = $this->contextManager->getSiteDefaultLanguage();
        $specialPages = $this->nodeRepository->findAllSpecialPage($language, $siteId);

        $specialPageList = $this->specialPageList;
        foreach ($specialPages as $specialPage) {
            if (($node instanceof NodeInterface &&
                $specialPage->getSpecialPageName() !== $node->getSpecialPageName()) ||
                is_null($node)
            ) {
                unset($specialPageList[$specialPage->getSpecialPageName()]);
            }
        }

        return $specialPageList;
    }
54472
public function append(Node $node) : bool
    {
        $node->parent = $this;

        return $this->childNodes->add($node);
    }