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

Breadcrumb

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

function Select::preRenderSelect

Prepares a select render element.

File

core/lib/Drupal/Core/Render/Element/Select.php, line 195

Class

Select
Provides a form element for a drop-down menu or scrolling selection box.

Namespace

Drupal\Core\Render\Element

Code

public static function preRenderSelect($element) {
    Element::setAttributes($element, [
        'id',
        'name',
        'size',
    ]);
    static::setAttributes($element, [
        'form-select',
    ]);
    return $element;
}
RSS feed
Powered by Drupal