function Token::getInfo

Same name in this branch
  1. 9 core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::getInfo()
Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Render/Element/Token.php \Drupal\Core\Render\Element\Token::getInfo()
  2. 8.9.x core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::getInfo()
  3. 10 core/lib/Drupal/Core/Render/Element/Token.php \Drupal\Core\Render\Element\Token::getInfo()
  4. 10 core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::getInfo()
  5. 11.x core/lib/Drupal/Core/Render/Element/Token.php \Drupal\Core\Render\Element\Token::getInfo()
  6. 11.x core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::getInfo()

Overrides Hidden::getInfo

File

core/lib/Drupal/Core/Render/Element/Token.php, line 22

Class

Token
Stores token data in a hidden form field.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#pre_render' => [
            [
                $class,
                'preRenderHidden',
            ],
        ],
        '#theme' => 'input__hidden',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.