Sets the Paragraphs widget add mode.
string $content_type: Content type name where to set the widget mode.
string $paragraphs_field: Paragraphs field to change the mode.
string $mode: Mode to be set. ('dropdown', 'select' or 'button').
Overrides ParagraphsTestBase::setAddMode
protected function setAddMode($content_type, $paragraphs_field, $mode) {
$form_display = EntityFormDisplay::load('node.' . $content_type . '.default')
->setComponent($paragraphs_field, [
'type' => 'paragraphs',
'settings' => [
'add_mode' => $mode,
],
]);
$form_display
->save();
}