Verified Commit b89ad7f9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3431452 by godotislate, smustgrave, alexpott: Rename RenderElement and...

Issue #3431452 by godotislate, smustgrave, alexpott: Rename RenderElement and FormElement plugin abstract classes to RenderElementBase and FormElementBase

(cherry picked from commit 8d1ff206)
parent 17b48823
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -709,7 +709,7 @@
$ignoreErrors[] = [
	'message' => '#^Variable \\$sort in isset\\(\\) always exists and is not nullable\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElement.php',
	'path' => __DIR__ . '/lib/Drupal/Core/Render/Element/RenderElementBase.php',
];
$ignoreErrors[] = [
	'message' => '#^Variable \\$output in empty\\(\\) always exists and is not falsy\\.$#',
+1 −1
Original line number Diff line number Diff line
@@ -2465,7 +2465,7 @@ function hook_validation_constraint_alter(array &$definitions) {
 * @section sec_query Query parameters in Ajax requests
 * If a form uses an Ajax field, all the query parameters in the current request
 * will be also added to the Ajax POST requests along with an additional
 * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElement).
 * 'ajax_form=1' parameter (See \Drupal\Core\Render\Element\RenderElementBase).
 * @code
 * $settings['options']['query'] += \Drupal::request()->query->all();
 * $settings['options']['query'][FormBuilderInterface::AJAX_FORM_REQUEST] = TRUE;
+4 −4
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
use Drupal\Core\Batch\BatchStorageInterface;
use Drupal\Core\Database\IntegrityConstraintViolationException;
use Drupal\Core\Render\Element;
use Drupal\Core\Render\Element\RenderElement;
use Drupal\Core\Render\Element\RenderElementBase;
use Drupal\Core\Template\Attribute;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -33,7 +33,7 @@
function template_preprocess_select(&$variables) {
  $element = $variables['element'];
  Element::setAttributes($element, ['id', 'name', 'size']);
  RenderElement::setAttributes($element, ['form-select']);
  RenderElementBase::setAttributes($element, ['form-select']);

  $variables['attributes'] = $element['#attributes'];
  $variables['options'] = form_select_options($element);
@@ -194,7 +194,7 @@ function form_get_options($element, $key) {
function template_preprocess_fieldset(&$variables) {
  $element = $variables['element'];
  Element::setAttributes($element, ['id']);
  RenderElement::setAttributes($element);
  RenderElementBase::setAttributes($element);
  $variables['attributes'] = $element['#attributes'] ?? [];
  $variables['prefix'] = $element['#field_prefix'] ?? NULL;
  $variables['suffix'] = $element['#field_suffix'] ?? NULL;
@@ -388,7 +388,7 @@ function template_preprocess_textarea(&$variables) {
  $element = $variables['element'];
  $attributes = ['id', 'name', 'rows', 'cols', 'maxlength', 'placeholder'];
  Element::setAttributes($element, $attributes);
  RenderElement::setAttributes($element, ['form-textarea']);
  RenderElementBase::setAttributes($element, ['form-textarea']);
  $variables['wrapper_attributes'] = new Attribute();
  $variables['attributes'] = new Attribute($element['#attributes']);
  $variables['value'] = $element['#value'];
+2 −2
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@

use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Render\Element\FormElement;
use Drupal\Core\Render\Element\FormElementBase;

/**
 * Provides a base class for date elements.
 */
abstract class DateElementBase extends FormElement {
abstract class DateElementBase extends FormElementBase {

  /**
   * Specifies the start and end year to use as a date range.
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public function buildResponse(Request $request, array $form, FormStateInterface
      // At this point we know callback returned a render element. If the
      // element is part of the group (#group is set on it) it won't be rendered
      // unless we remove #group from it. This is caused by
      // \Drupal\Core\Render\Element\RenderElement::preRenderGroup(), which
      // \Drupal\Core\Render\Element\RenderElementBase::preRenderGroup(), which
      // prevents all members of groups from being rendered directly.
      if (!empty($result['#group'])) {
        unset($result['#group']);
Loading