You are here

protected function BricksTreeDynamicWidget::formMultipleElements in Bricks​ 2.x

Same name and namespace in other branches
  1. 8 modules/bricks_dynamic/src/Plugin/Field/FieldWidget/BricksTreeDynamicWidget.php \Drupal\bricks_dynamic\Plugin\Field\FieldWidget\BricksTreeDynamicWidget::formMultipleElements()

File

modules/bricks_dynamic/src/Plugin/Field/FieldWidget/BricksTreeDynamicWidget.php, line 39

Class

BricksTreeDynamicWidget
Plugin annotation @FieldWidget( id = "bricks_tree_dynamic", label = @Translation("Bricks tree (Dynamic)"), description = @Translation("A tree of autocomplete text fields."), field_types = { "bricks_dynamic" } )

Namespace

Drupal\bricks_dynamic\Plugin\Field\FieldWidget

Code

protected function formMultipleElements(FieldItemListInterface $items, array &$form, FormStateInterface $form_state) {
  $elements = parent::formMultipleElements($items, $form, $form_state);
  $elements['#widget'] = 'bricks_tree_dynamic';
  return $elements;
}