You are here

public function PseudoClassExtension::translateLastChild in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php \Symfony\Component\CssSelector\XPath\Extension\PseudoClassExtension::translateLastChild()

Parameters

XPathExpr $xpath:

Return value

XPathExpr

File

vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php, line 72

Class

PseudoClassExtension
XPath expression translator pseudo-class extension.

Namespace

Symfony\Component\CssSelector\XPath\Extension

Code

public function translateLastChild(XPathExpr $xpath) {
  return $xpath
    ->addStarPrefix()
    ->addNameTest()
    ->addCondition('position() = last()');
}