protected function ParagraphsTestBase::setParagraphsTypeWeight in Paragraphs 8
Sets the weight of a given Paragraphs type.
Parameters
string $content_type: Content type name that contains the paragraphs field.
string $paragraphs_type: ID of Paragraph type that will be modified.
int $weight: Weight to be set.
string $paragraphs_field: Paragraphs field name that does the reference.
4 calls to ParagraphsTestBase::setParagraphsTypeWeight()
- ParagraphsAddModesTest::testDropDownMode in tests/
src/ Functional/ WidgetLegacy/ ParagraphsAddModesTest.php - Tests the add drop down button.
- ParagraphsAddModesTest::testDropDownMode in tests/
src/ Functional/ WidgetStable/ ParagraphsAddModesTest.php - Tests the add drop down button.
- ParagraphsAddModesTest::testSelectMode in tests/
src/ Functional/ WidgetLegacy/ ParagraphsAddModesTest.php - Tests the add select mode.
- ParagraphsAddModesTest::testSelectMode in tests/
src/ Functional/ WidgetStable/ ParagraphsAddModesTest.php - Tests the add select mode.
File
- tests/
src/ Functional/ WidgetLegacy/ ParagraphsTestBase.php, line 151
Class
- ParagraphsTestBase
- Base class for tests.
Namespace
Drupal\Tests\paragraphs\Functional\WidgetLegacyCode
protected function setParagraphsTypeWeight($content_type, $paragraphs_type, $weight, $paragraphs_field) {
$this
->drupalGet('admin/structure/types/manage/' . $content_type . '/fields/node.' . $content_type . '.' . $paragraphs_field);
$edit['settings[handler_settings][target_bundles_drag_drop][' . $paragraphs_type . '][weight]'] = $weight;
$this
->submitForm($edit, 'Save settings');
}