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

Breadcrumb

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

function AttributeNode::__toString

File

vendor/symfony/css-selector/Node/AttributeNode.php, line 65

Class

AttributeNode
Represents a "<selector>[<namespace>|<attribute> <operator> <value>]" node.

Namespace

Symfony\Component\CssSelector\Node

Code

public function __toString() : string {
    $attribute = $this->namespace ? $this->namespace . '|' . $this->attribute : $this->attribute;
    return 'exists' === $this->operator ? \sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute) : \sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value);
}

API Navigation

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