public function NodeExtension::translateClass 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::translateClass()
Parameters
Node\ClassNode $node:
Translator $translator:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Extension/ NodeExtension.php, line 198
Class
- NodeExtension
- XPath expression translator node extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translateClass(Node\ClassNode $node, Translator $translator) {
$xpath = $translator
->nodeToXPath($node
->getSelector());
return $translator
->addAttributeMatching($xpath, '~=', '@class', $node
->getName());
}