Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HtmlExtension.php

function HtmlExtension::translateEnabled

1 call to HtmlExtension::translateEnabled()
HtmlExtension::getPseudoClassTranslators in vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php
Returns pseudo-class translators.

File

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

Class

HtmlExtension
XPath expression translator HTML extension.

Namespace

Symfony\Component\CssSelector\XPath\Extension

Code

public function translateEnabled(XPathExpr $xpath) : XPathExpr {
    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]' . ')' . ')');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal