You are here

public static function FieldCollectionEmbedWidget::renderRequired in Field collection 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php \Drupal\field_collection\Plugin\Field\FieldWidget\FieldCollectionEmbedWidget::renderRequired()

#pre_render callback ensures the element is rendered as being required.

File

src/Plugin/Field/FieldWidget/FieldCollectionEmbedWidget.php, line 166

Class

FieldCollectionEmbedWidget
Plugin implementation of the 'field_collection_embed' widget.

Namespace

Drupal\field_collection\Plugin\Field\FieldWidget

Code

public static function renderRequired($element) {
  $element['#required'] = TRUE;
  return $element;
}