function PathWidget::errorElement

Same name in other branches
  1. 9 core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php \Drupal\path\Plugin\Field\FieldWidget\PathWidget::errorElement()
  2. 10 core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php \Drupal\path\Plugin\Field\FieldWidget\PathWidget::errorElement()
  3. 11.x core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php \Drupal\path\Plugin\Field\FieldWidget\PathWidget::errorElement()

Overrides WidgetBase::errorElement

File

core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php, line 112

Class

PathWidget
Plugin implementation of the 'path' widget.

Namespace

Drupal\path\Plugin\Field\FieldWidget

Code

public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
    return $element['alias'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.