public function HtmlExtension::translateDisabled in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php \Symfony\Component\CssSelector\XPath\Extension\HtmlExtension::translateDisabled()
Parameters
XPathExpr $xpath:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Extension/ HtmlExtension.php, line 98
Class
- HtmlExtension
- XPath expression translator HTML extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translateDisabled(XPathExpr $xpath) {
return $xpath
->addCondition('(' . '@disabled and' . '(' . "(name(.) = 'input' and @type != 'hidden')" . " or name(.) = 'button'" . " or name(.) = 'select'" . " or name(.) = 'textarea'" . " or name(.) = 'command'" . " or name(.) = 'fieldset'" . " or name(.) = 'optgroup'" . " or name(.) = 'option'" . ')' . ') or (' . "(name(.) = 'input' and @type != 'hidden')" . " or name(.) = 'button'" . " or name(.) = 'select'" . " or name(.) = 'textarea'" . ')' . ' and ancestor::fieldset[@disabled]');
// todo: in the second half, add "and is not a descendant of that fieldset element's first legend element child, if any."
}