public function HtmlExtension::translateEnabled 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::translateEnabled()
Parameters
XPathExpr $xpath:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Extension/ HtmlExtension.php, line 129
Class
- HtmlExtension
- XPath expression translator HTML extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translateEnabled(XPathExpr $xpath) {
return $xpath
->addCondition('(' . '@href and (' . "name(.) = 'a'" . " or name(.) = 'link'" . " or name(.) = 'area'" . ')' . ') or (' . '(' . "name(.) = 'command'" . " or name(.) = 'fieldset'" . " or name(.) = 'optgroup'" . ')' . ' and not(@disabled)' . ') or (' . '(' . "(name(.) = 'input' and @type != 'hidden')" . " or name(.) = 'button'" . " or name(.) = 'select'" . " or name(.) = 'textarea'" . " or name(.) = 'keygen'" . ')' . ' and not (@disabled or ancestor::fieldset[@disabled])' . ') or (' . "name(.) = 'option' and not(" . '@disabled or ancestor::optgroup[@disabled]' . ')' . ')');
}