diff --git a/core/modules/field/field.form.inc b/core/modules/field/field.form.inc index 84b80c1..64b6e3f 100644 --- a/core/modules/field/field.form.inc +++ b/core/modules/field/field.form.inc @@ -7,6 +7,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Render\Element; /** * Prepares variables for individual form element templates. @@ -54,7 +55,7 @@ function template_preprocess_field_multiple_value_form(&$variables) { // preview or failed validation). $items = array(); $variables['button'] = array(); - foreach (element_children($element) as $key) { + foreach (Element::children($element) as $key) { if ($key === 'add_more') { $variables['button'] = &$element[$key]; } @@ -85,7 +86,7 @@ function template_preprocess_field_multiple_value_form(&$variables) { } $variables['table'] = array( - '#theme' => 'table', + '#type' => 'table', '#header' => $header, '#rows' => $rows, '#attributes' => array( @@ -105,7 +106,7 @@ function template_preprocess_field_multiple_value_form(&$variables) { } else { $variables['elements'] = array(); - foreach (element_children($element) as $key) { + foreach (Element::children($element) as $key) { $variables['elements'][] = $element[$key]; } } diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 1539f76..06cc6ab 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -179,9 +179,6 @@ function bartik_menu_tree__shortcut_default($variables) { * Implements theme_preprocess_HOOK() for field templates. * * @see template_preprocess_field() - * - * @todo Use bartik_theme_prepare_field__taxonomy_term_reference when - * https://drupal.org/node/2035055 is resolved */ function bartik_preprocess_field(&$variables) { $element = $variables['element'];