diff --git a/core/lib/Drupal/Core/Render/Element/Date.php b/core/lib/Drupal/Core/Render/Element/Date.php index dcee06228ca5944f6331997a81afc9d8c7a1ec9a..7a0801d9c8474e2f0675b6858ee6c9b2897f452f 100644 --- a/core/lib/Drupal/Core/Render/Element/Date.php +++ b/core/lib/Drupal/Core/Render/Element/Date.php @@ -11,6 +11,7 @@ * Properties: * - #default_value: An array with the keys: 'year', 'month', and 'day'. * Defaults to the current date if no value is supplied. + * - #size: The size of the input element in characters. * * @code * $form['expiration'] = array( diff --git a/core/lib/Drupal/Core/Render/Element/Email.php b/core/lib/Drupal/Core/Render/Element/Email.php index 4b4da7b0442d5a845fa1ae6f1d3f3b97fc09068a..247967667f0be222045dfc20c026164dbd583420 100644 --- a/core/lib/Drupal/Core/Render/Element/Email.php +++ b/core/lib/Drupal/Core/Render/Element/Email.php @@ -10,6 +10,7 @@ * * Properties: * - #default_value: An RFC-compliant email address. + * - #size: The size of the input element in characters. * * Example usage: * @code diff --git a/core/lib/Drupal/Core/Render/Element/Number.php b/core/lib/Drupal/Core/Render/Element/Number.php index b2fbb1125e61d5e48f5b234b396a9eb6fb00dd57..788aa1e6c773fee1e77954dd0ea45b15a4e4ed19 100644 --- a/core/lib/Drupal/Core/Render/Element/Number.php +++ b/core/lib/Drupal/Core/Render/Element/Number.php @@ -16,6 +16,7 @@ * - #step: Ensures that the number is an even multiple of step, offset by #min * if specified. A #min of 1 and a #step of 2 would allow values of 1, 3, 5, * etc. + * - #size: The size of the input element in characters. * * Usage example: * @code diff --git a/core/lib/Drupal/Core/Render/Element/Password.php b/core/lib/Drupal/Core/Render/Element/Password.php index e16e8bb436cf3a6214cc431bc6413f6d367d1ea2..06d5532e550947d3756152a5346862df77a5cfbe 100644 --- a/core/lib/Drupal/Core/Render/Element/Password.php +++ b/core/lib/Drupal/Core/Render/Element/Password.php @@ -8,6 +8,9 @@ /** * Provides a form element for entering a password, with hidden text. * + * Properties: + * - #size: The size of the input element in characters. + * * Usage example: * @code * $form['pass'] = array( diff --git a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php index 98b65ed90f2abe238d393836211e34ad4c6855a8..0d5e0e2865ae39d43834e865b386ec706dfbd2af 100644 --- a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php +++ b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php @@ -10,6 +10,9 @@ * Formats as a pair of password fields, which do not validate unless the two * entered passwords match. * + * Properties: + * - #size: The size of the input element in characters. + * * Usage example: * @code * $form['pass'] = array( diff --git a/core/lib/Drupal/Core/Render/Element/Select.php b/core/lib/Drupal/Core/Render/Element/Select.php index f78dfa9f13b78fff2e7f962dd12d1948d016f662..b1e0f4ab686649fa0ecc49c4db3fadb757bc0059 100644 --- a/core/lib/Drupal/Core/Render/Element/Select.php +++ b/core/lib/Drupal/Core/Render/Element/Select.php @@ -14,8 +14,31 @@ * list. If a value is an array, it will be rendered similarly, but as an * optgroup. The key of the sub-array will be used as the label for the * optgroup. Nesting optgroups is not allowed. - * - #empty_option: The label that will be displayed to denote no selection. - * - #empty_value: The value of the option that is used to denote no selection. + * - #empty_option: (optional) The label to show for the first default option. + * By default, the label is automatically set to "- Select -" for a required + * field and "- None -" for an optional field. + * - #empty_value: (optional) The value for the first default option, which is + * used to determine whether the user submitted a value or not. + * - If #required is TRUE, this defaults to '' (an empty string). + * - If #required is not TRUE and this value isn't set, then no extra option + * is added to the select control, leaving the control in a slightly + * illogical state, because there's no way for the user to select nothing, + * since all user agents automatically preselect the first available + * option. But people are used to this being the behavior of select + * controls. + * @todo Address the above issue in Drupal 8. + * - If #required is not TRUE and this value is set (most commonly to an + * empty string), then an extra option (see #empty_option above) + * representing a "non-selection" is added with this as its value. + * - #multiple: (optional) Indicates whether one or more options can be + * selected. Defaults to FALSE. + * - #default_value: Must be NULL or not set in case there is no value for the + * element yet, in which case a first default option is inserted by default. + * Whether this first option is a valid option depends on whether the field + * is #required or not. + * - #required: (optional) Whether the user needs to select an option (TRUE) + * or not (FALSE). Defaults to FALSE. + * - #size: The size of the input element in characters. * * Usage example: * @code @@ -66,31 +89,7 @@ public function getInfo() { * select lists. * * @param array $element - * The form element to process. Properties used: - * - #multiple: (optional) Indicates whether one or more options can be - * selected. Defaults to FALSE. - * - #default_value: Must be NULL or not set in case there is no value for the - * element yet, in which case a first default option is inserted by default. - * Whether this first option is a valid option depends on whether the field - * is #required or not. - * - #required: (optional) Whether the user needs to select an option (TRUE) - * or not (FALSE). Defaults to FALSE. - * - #empty_option: (optional) The label to show for the first default option. - * By default, the label is automatically set to "- Select -" for a required - * field and "- None -" for an optional field. - * - #empty_value: (optional) The value for the first default option, which is - * used to determine whether the user submitted a value or not. - * - If #required is TRUE, this defaults to '' (an empty string). - * - If #required is not TRUE and this value isn't set, then no extra option - * is added to the select control, leaving the control in a slightly - * illogical state, because there's no way for the user to select nothing, - * since all user agents automatically preselect the first available - * option. But people are used to this being the behavior of select - * controls. - * @todo Address the above issue in Drupal 8. - * - If #required is not TRUE and this value is set (most commonly to an - * empty string), then an extra option (see #empty_option above) - * representing a "non-selection" is added with this as its value. + * The form element to process. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. * @param array $complete_form diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php index 75bcab5544cc18dc7e53e2e341a4d229e71b4446..298a27fa651a4b3ad70e26cbc4b5f9a58b472e44 100644 --- a/core/lib/Drupal/Core/Render/Element/Table.php +++ b/core/lib/Drupal/Core/Render/Element/Table.php @@ -24,6 +24,7 @@ * providing responsive tables. Defaults to TRUE. * - #sticky: Indicates whether to add the drupal.tableheader library that makes * table headers always visible at the top of the page. Defaults to FALSE. + * - #size: The size of the input element in characters. * * Usage example: * @code diff --git a/core/lib/Drupal/Core/Render/Element/Tel.php b/core/lib/Drupal/Core/Render/Element/Tel.php index 02b071d5af1c63d4e763c20f5d61d98eb53ac88d..09093938420fff7157470f23ab545b39fc8af3f2 100644 --- a/core/lib/Drupal/Core/Render/Element/Tel.php +++ b/core/lib/Drupal/Core/Render/Element/Tel.php @@ -10,6 +10,9 @@ * Provides an HTML5 input element with type of "tel". It provides no special * validation. * + * Properties: + * - #size: The size of the input element in characters. + * * Usage example: * @code * $form['phone'] = array( diff --git a/core/lib/Drupal/Core/Render/Element/Url.php b/core/lib/Drupal/Core/Render/Element/Url.php index 33d91ed1cd41c58bfd68b06db1a87db42e37bca5..c66cadc638711e1af6ae8e8845ddf7ed2dd4598e 100644 --- a/core/lib/Drupal/Core/Render/Element/Url.php +++ b/core/lib/Drupal/Core/Render/Element/Url.php @@ -11,6 +11,7 @@ * * Properties: * - #default_value: A valid URL string. + * - #size: The size of the input element in characters. * * Usage example: * @code