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

Breadcrumb

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

function Translator::addFunction

Throws

ExpressionErrorException

File

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

Class

Translator
XPath expression translator interface.

Namespace

Symfony\Component\CssSelector\XPath

Code

public function addFunction(XPathExpr $xpath, FunctionNode $function) : XPathExpr {
    if (!isset($this->functionTranslators[$function->getName()])) {
        throw new ExpressionErrorException(\sprintf('Function "%s" not supported.', $function->getName()));
    }
    return $this->functionTranslators[$function->getName()]($xpath, $function);
}

API Navigation

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