public static function ParagraphsWidget::itemAjax in Paragraphs 8
File
- src/
Plugin/ Field/ FieldWidget/ ParagraphsWidget.php, line 1884
Class
- ParagraphsWidget
- Plugin implementation of the 'entity_reference_revisions paragraphs' widget.
Namespace
Drupal\paragraphs\Plugin\Field\FieldWidgetCode
public static function itemAjax(array $form, FormStateInterface $form_state) {
$submit = ParagraphsWidget::getSubmitElementInfo($form, $form_state, ParagraphsWidget::ACTION_POSITION_ACTIONS);
$submit['element']['#prefix'] = '<div class="ajax-new-content">' . (isset($submit['element']['#prefix']) ? $submit['element']['#prefix'] : '');
$submit['element']['#suffix'] = (isset($submit['element']['#suffix']) ? $submit['element']['#suffix'] : '') . '</div>';
return $submit['element'];
}