diff --git a/core/includes/common.inc b/core/includes/common.inc index f2569a6417a0d7046e07534414d3f79667b2c974..05ae17e392b492524883a252679538d4e57ea1c8 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -237,7 +237,7 @@ function drupal_get_profile() { * @return * An array of all stored HEAD elements. * - * @see drupal_pre_render_html_tag() + * @see \Drupal\Core\Render\Element\HtmlTag::preRenderHtmlTag() */ function drupal_add_html_head($data = NULL, $key = NULL) { $stored_head = &drupal_static(__FUNCTION__, array()); @@ -1802,7 +1802,6 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS * browser. * * @see _drupal_add_js() - * @see drupal_pre_render_scripts() */ function drupal_merge_js_settings($settings_items) { return NestedArray::mergeDeepArray($settings_items, TRUE); diff --git a/core/includes/form.inc b/core/includes/form.inc index 630309537fc329f565ac3a2408aadf59d7609566..4afdca47ccbd39442016f18d4bb63e9baee639ca 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -556,9 +556,8 @@ function template_preprocess_textarea(&$variables) { * - before: The label is output before the element. This is the default. * The label includes the #title and the required marker, if #required. * - after: The label is output after the element. For example, this is used - * for radio and checkbox #type elements as set in system_element_info(). - * If the #title is empty but the field is #required, the label will - * contain only the required marker. + * for radio and checkbox #type elements. If the #title is empty but the field + * is #required, the label will contain only the required marker. * - invisible: Labels are critical for screen readers to enable them to * properly navigate through forms but can be visually distracting. This * property hides the label for everyone except screen readers. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 592308f38cfcbdb336044dce2f9731b41d3e8323..cb6122a6aa4d50f1ce5844cea4dc5e5cc778848d 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1684,8 +1684,6 @@ function drupal_pre_render_html(array $element) { * @param array $variables * An associative array containing: * - page: A render element representing the page. - * - * @see system_element_info() */ function template_preprocess_html(&$variables) { /** @var $page \Drupal\Core\Page\HtmlPage */ diff --git a/core/lib/Drupal/Core/Form/FormValidator.php b/core/lib/Drupal/Core/Form/FormValidator.php index 504a606507e39a192df37fd7052ce2dcb636cf49..ee2da6518b8008393ce0a6becc676afce9594a5f 100644 --- a/core/lib/Drupal/Core/Form/FormValidator.php +++ b/core/lib/Drupal/Core/Form/FormValidator.php @@ -338,7 +338,7 @@ protected function performRequiredValidation(&$elements, FormStateInterface &$fo // get an additional, first empty option. In case the submitted value // is identical to the empty option's value, we reset the element's // value to NULL to trigger the regular #required handling below. - // @see form_process_select() + // @see \Drupal\Core\Render\Element\Select::processSelect() elseif ($elements['#type'] == 'select' && !$elements['#multiple'] && $elements['#required'] && !isset($elements['#default_value']) && $elements['#value'] === $elements['#empty_value']) { $elements['#value'] = NULL; $form_state->setValueForElement($elements, NULL); @@ -380,9 +380,8 @@ protected function determineLimitValidationErrors(FormStateInterface &$form_stat // by default, which is particularly useful during an Ajax submission // triggered by a non-button. An element can override this default by // setting the #limit_validation_errors property. For button element - // types, #limit_validation_errors defaults to FALSE (via - // system_element_info()), so that full validation is their default - // behavior. + // types, #limit_validation_errors defaults to FALSE, so that full + // validation is their default behavior. elseif ($triggering_element && !isset($triggering_element['#limit_validation_errors']) && !$form_state->isSubmitted()) { return array(); } diff --git a/core/lib/Drupal/Core/Render/Element/Checkbox.php b/core/lib/Drupal/Core/Render/Element/Checkbox.php index 43b37ca15b7f3d5078ce16deb47b35673657bcb4..6a99ecae9e1f27bd14a2195a9b785e559ac179bb 100644 --- a/core/lib/Drupal/Core/Render/Element/Checkbox.php +++ b/core/lib/Drupal/Core/Render/Element/Checkbox.php @@ -68,7 +68,8 @@ public static function valueCallback(&$element, $input, FormStateInterface $form // as unchecked. The string '0' is allowed for #return_value. The most // common use-case for setting #return_value to either 0 or '0' is for the // first option within a 0-indexed array of checkboxes, and for this, - // form_process_checkboxes() uses the string rather than the integer. + // \Drupal\Core\Render\Element\Checkboxes::processCheckboxes() uses the + // string rather than the integer. return isset($input) ? $element['#return_value'] : 0; } } diff --git a/core/lib/Drupal/Core/Render/Element/Checkboxes.php b/core/lib/Drupal/Core/Render/Element/Checkboxes.php index aa3b64c2eb817acc1f687d50fdf22e2091fd4020..303b6e3f8ab970adfa55143f4c2fa5595db1f9b6 100644 --- a/core/lib/Drupal/Core/Render/Element/Checkboxes.php +++ b/core/lib/Drupal/Core/Render/Element/Checkboxes.php @@ -55,9 +55,9 @@ public static function processCheckboxes(&$element, FormStateInterface $form_sta $weight = 0; foreach ($element['#options'] as $key => $choice) { // Integer 0 is not a valid #return_value, so use '0' instead. - // @see form_type_checkbox_value(). + // @see \Drupal\Core\Render\Element\Checkbox::valueCallback(). // @todo For Drupal 8, cast all integer keys to strings for consistency - // with form_process_radios(). + // with \Drupal\Core\Render\Element\Radios::processRadios(). if ($key === 0) { $key = '0'; } diff --git a/core/lib/Drupal/Core/Render/Element/Select.php b/core/lib/Drupal/Core/Render/Element/Select.php index f939641917db330c67178c2d2586165695d0284f..70f14d66cbabcda6833bf2cba3da152198b9829d 100644 --- a/core/lib/Drupal/Core/Render/Element/Select.php +++ b/core/lib/Drupal/Core/Render/Element/Select.php @@ -132,12 +132,12 @@ public static function valueCallback(&$element, $input, FormStateInterface $form return (isset($element['#default_value']) && is_array($element['#default_value'])) ? $element['#default_value'] : array(); } } - // Non-multiple select elements may have an empty option preprended to them - // (see form_process_select()). When this occurs, usually #empty_value is - // an empty string, but some forms set #empty_value to integer 0 or some - // other non-string constant. PHP receives all submitted form input as - // strings, but if the empty option is selected, set the value to match the - // empty value exactly. + // Non-multiple select elements may have an empty option prepended to them + // (see \Drupal\Core\Render\Element\Select::processSelect()). When this + // occurs, usually #empty_value is an empty string, but some forms set + // #empty_value to integer 0 or some other non-string constant. PHP + // receives all submitted form input as strings, but if the empty option + // is selected, set the value to match the empty value exactly. elseif (isset($element['#empty_value']) && $input === (string) $element['#empty_value']) { return $element['#empty_value']; } diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php index 191de689f9d503378e0b454694efb821376efbae..3751a291cc6f9fddcb4c4c4c4241d20e7a251b5c 100644 --- a/core/lib/Drupal/Core/Render/Element/Table.php +++ b/core/lib/Drupal/Core/Render/Element/Table.php @@ -47,8 +47,8 @@ public function getInfo() { ), // Properties for tabledrag support. // The value is a list of arrays that are passed to - // drupal_attach_tabledrag(). drupal_pre_render_table() prepends the HTML - // ID of the table to each set of options. + // drupal_attach_tabledrag(). Table::preRenderTable() prepends the HTML ID + // of the table to each set of options. // @see drupal_attach_tabledrag() '#tabledrag' => array(), // Render properties. @@ -124,9 +124,9 @@ public static function processTable(&$element, FormStateInterface $form_state, & foreach (Element::children($element) as $key) { $row = &$element[$key]; // Prepare the element #parents for the tableselect form element. - // Their values have to be located in child keys (#tree is ignored), since - // form_validate_table() has to be able to validate whether input (for the - // parent #type 'table' element) has been submitted. + // Their values have to be located in child keys (#tree is ignored), + // since Table::validateTable() has to be able to validate whether input + // (for the parent #type 'table' element) has been submitted. $element_parents = array_merge($element['#parents'], array($key)); // Since the #parents of the tableselect form element will equal the diff --git a/core/modules/field_ui/src/OverviewBase.php b/core/modules/field_ui/src/OverviewBase.php index 7132eda3ac1644a3d55fc0031b829bb286382ed7..bd1685eb21239a1a2493a74b1d721a3ff42d6c28 100644 --- a/core/modules/field_ui/src/OverviewBase.php +++ b/core/modules/field_ui/src/OverviewBase.php @@ -141,7 +141,7 @@ public function getRegionOptions() { * $options array. * * @see drupal_render() - * @see drupal_pre_render_table() + * @see \Drupal\Core\Render\Element\Table::preRenderTable() */ public function tablePreRender($elements) { $js_settings = array(); @@ -215,7 +215,7 @@ public function tablePreRender($elements) { // If the custom #tabledrag is set and there is a HTML ID, add the table's // HTML ID to the options and attach the behavior. - // @see drupal_pre_render_table() + // @see \Drupal\Core\Render\Element\Table::preRenderTable() if (!empty($elements['#tabledrag']) && isset($elements['#attributes']['id'])) { foreach ($elements['#tabledrag'] as $options) { $options['table_id'] = $elements['#attributes']['id']; diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php index 7741331a0a72af7692c3f7db4b2a86c768bc6b24..74e3d450a77663876774a1412f5aec54e1130829 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php @@ -128,7 +128,7 @@ abstract protected function allowedValuesDescription(); * @param $form_state * The current state of the form for the form this element belongs to. * - * @see form_process_pattern() + * @see \Drupal\Core\Render\Element\FormElement::processPattern() */ public static function validateAllowedValues($element, FormStateInterface $form_state) { $values = static::extractAllowedValues($element['#value'], $element['#field_has_data']); diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 8ff3575c63d54647596ef4c866da00ba354f38af..dc3771361cd8ca3b7c8750b3cc0d850752ffaa72 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -959,8 +959,9 @@ protected function installParameters() { 'pass2' => $this->root_user->pass_raw, ), ), - // form_type_checkboxes_value() requires NULL instead of FALSE values - // for programmatic form submissions to disable a checkbox. + // \Drupal\Core\Render\Element\Checkboxes::valueCallback() requires + // NULL instead of FALSE values for programmatic form submissions to + // disable a checkbox. 'update_status_module' => array( 1 => NULL, 2 => NULL, diff --git a/core/modules/system/src/Tests/Form/CheckboxTest.php b/core/modules/system/src/Tests/Form/CheckboxTest.php index b667295ad406f489df0bf635d5920080ae594597..da53a794f821312e46259917c68f823cc6c5ab4e 100644 --- a/core/modules/system/src/Tests/Form/CheckboxTest.php +++ b/core/modules/system/src/Tests/Form/CheckboxTest.php @@ -30,7 +30,7 @@ function testFormCheckbox() { foreach (array(FALSE, NULL, TRUE, 0, '0', '', 1, '1', 'foobar', '1foobar') as $default_value) { // Only values that can be used for array indices are supported for // #return_value, with the exception of integer 0, which is not supported. - // @see form_process_checkbox(). + // @see \Drupal\Core\Render\Element\Checkbox::processCheckbox(). foreach (array('0', '', 1, '1', 'foobar', '1foobar') as $return_value) { $form_array = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestCheckboxTypeJugglingForm', $default_value, $return_value); $form = drupal_render($form_array); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 59922b7c776d2a66aabd3e434a217f0d67b7a754..76a0680ae2a66c4846553176ed8286c29cf55ed1 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -203,7 +203,6 @@ function callback_queue_worker($queue_item_data) { * \Drupal\Core\Render\Element\ElementInterface. * * @see hook_element_info_alter() - * @see system_element_info() */ function hook_element_info() { $types['filter_format'] = array( diff --git a/core/modules/system/templates/form-element.html.twig b/core/modules/system/templates/form-element.html.twig index 4c359ba4fc3567fd4d3a5d520f5718fc14e5644d..5f97dbc859c3bc0a5da40d392aecd75f10fac922 100644 --- a/core/modules/system/templates/form-element.html.twig +++ b/core/modules/system/templates/form-element.html.twig @@ -14,9 +14,8 @@ * - before: The label is output before the element. This is the default. * The label includes the #title and the required marker, if #required. * - after: The label is output after the element. For example, this is used - * for radio and checkbox #type elements as set in system_element_info(). - * If the #title is empty but the field is #required, the label will - * contain only the required marker. + * for radio and checkbox #type elements. If the #title is empty but the + * field is #required, the label will contain only the required marker. * - invisible: Labels are critical for screen readers to enable them to * properly navigate through forms but can be visually distracting. This * property hides the label for everyone except screen readers. diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index cc9012baaa8ad962a7c1d7818e7d12d8b44161a3..da87adebcf50c6486dd2f3338cfd0aa735f968d8 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -1064,7 +1064,7 @@ public function getSortName() { * array as index. While doing that, create a container element underneath * each option, which contains the settings related to that option. * - * @see form_process_radios() + * @see \Drupal\Core\Render\Element\Radios::processRadios() */ public static function processContainerRadios($element) { if (count($element['#options']) > 0) {