public static function FieldCollectionEmbedWidget::renderRequired in Field collection 8
Same name and namespace in other branches
- 8.3 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 167
Class
- FieldCollectionEmbedWidget
- Plugin implementation of the 'field_collection_embed' widget.
Namespace
Drupal\field_collection\Plugin\Field\FieldWidgetCode
public static function renderRequired($element) {
$element['#required'] = TRUE;
return $element;
}