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

Breadcrumb

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

function TextareaWithSummaryWidget::errorElement

Overrides TextareaWidget::errorElement

File

core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php, line 101

Class

TextareaWithSummaryWidget
Plugin implementation of the 'text_textarea_with_summary' widget.

Namespace

Drupal\text\Plugin\Field\FieldWidget

Code

public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
    $element = parent::errorElement($element, $violation, $form, $form_state);
    $property_path_array = explode('.', $violation->getPropertyPath());
    return $element === FALSE ? FALSE : $element[$property_path_array[1]];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal