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

Breadcrumb

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

function Radio::getInfo

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Radio.php, line 23

Class

Radio
Provides a form element for a single radio button.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    $class = static::class;
    return [
        '#input' => TRUE,
        '#default_value' => NULL,
        '#process' => [
            [
                $class,
                'processAjaxForm',
            ],
        ],
        '#pre_render' => [
            [
                $class,
                'preRenderRadio',
            ],
        ],
        '#theme' => 'input__radio',
        '#theme_wrappers' => [
            'form_element',
        ],
        '#title_display' => 'after',
    ];
}
RSS feed
Powered by Drupal