You are here

public function HtmlExtension::translateChecked in Zircon Profile 8.0

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

Parameters

XPathExpr $xpath:

Return value

XPathExpr

File

vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php, line 74

Class

HtmlExtension
XPath expression translator HTML extension.

Namespace

Symfony\Component\CssSelector\XPath\Extension

Code

public function translateChecked(XPathExpr $xpath) {
  return $xpath
    ->addCondition('(@checked ' . "and (name(.) = 'input' or name(.) = 'command')" . "and (@type = 'checkbox' or @type = 'radio'))");
}