WordPress at a glance
function is not described

Symfony\Component\CssSelector\XPath\Extension

NodeExtension::translateNegation() public WC 1.0

{} It's a method of the class: NodeExtension{}

No Hooks.

Return

XPathExpr.

Usage

$NodeExtension = new NodeExtension();
$NodeExtension->translateNegation( Node\NegationNode $node, $translator );
Node\NegationNode $node (required)
-
$translator(Translator) (required)
-

Code of NodeExtension::translateNegation() WC 5.4.1

<?php
public function translateNegation(Node\NegationNode $node, Translator $translator)
{
    $xpath = $translator->nodeToXPath($node->getSelector());
    $subXpath = $translator->nodeToXPath($node->getSubSelector());
    $subXpath->addNameTest();

    if ($subXpath->getCondition()) {
        return $xpath->addCondition(sprintf('not(%s)', $subXpath->getCondition()));
    }

    return $xpath->addCondition('0');
}