Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Translator.php

function Translator::nodeToXPath

Throws

ExpressionErrorException

2 calls to Translator::nodeToXPath()
Translator::addCombination in vendor/symfony/css-selector/XPath/Translator.php
Translator::selectorToXPath in vendor/symfony/css-selector/XPath/Translator.php
Translates a parsed selector node to an XPath expression.

File

vendor/symfony/css-selector/XPath/Translator.php, line 152

Class

Translator
XPath expression translator interface.

Namespace

Symfony\Component\CssSelector\XPath

Code

public function nodeToXPath(NodeInterface $node) : XPathExpr {
    if (!isset($this->nodeTranslators[$node->getNodeName()])) {
        throw new ExpressionErrorException(\sprintf('Node "%s" not supported.', $node->getNodeName()));
    }
    return $this->nodeTranslators[$node->getNodeName()]($node, $this);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal