function 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.