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

Breadcrumb

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

function MatchingNode::getSpecificity

Overrides NodeInterface::getSpecificity

File

vendor/symfony/css-selector/Node/MatchingNode.php, line 35

Class

MatchingNode
Represents a "<selector>:is(<subSelectorList>)" node.

Namespace

Symfony\Component\CssSelector\Node

Code

public function getSpecificity() : Specificity {
    $argumentsSpecificity = array_reduce($this->arguments, fn($c, $n) => 1 === $n->getSpecificity()
        ->compareTo($c) ? $n->getSpecificity() : $c, new Specificity(0, 0, 0));
    return $this->selector
        ->getSpecificity()
        ->plus($argumentsSpecificity);
}

API Navigation

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