public function NodeExtension::translateHash in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/XPath/Extension/NodeExtension.php \Symfony\Component\CssSelector\XPath\Extension\NodeExtension::translateHash()
Parameters
Node\HashNode $node:
Translator $translator:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Extension/ NodeExtension.php, line 211
Class
- NodeExtension
- XPath expression translator node extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translateHash(Node\HashNode $node, Translator $translator) {
$xpath = $translator
->nodeToXPath($node
->getSelector());
return $translator
->addAttributeMatching($xpath, '=', '@id', $node
->getId());
}