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

Breadcrumb

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

function Translator::addAttributeMatching

Throws

ExpressionErrorException

File

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

Class

Translator
XPath expression translator interface.

Namespace

Symfony\Component\CssSelector\XPath

Code

public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, ?string $value) : XPathExpr {
    if (!isset($this->attributeMatchingTranslators[$operator])) {
        throw new ExpressionErrorException(\sprintf('Attribute matcher operator "%s" not supported.', $operator));
    }
    return $this->attributeMatchingTranslators[$operator]($xpath, $attribute, $value);
}

API Navigation

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