public function ThunderParagraphsTestTrait::addGalleryParagraph in Thunder 8.2
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
- 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
- 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
- 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addGalleryParagraph()
Add Gallery paragraph.
Parameters
string $fieldName: Field name.
string $name: Name of the gallery.
array $media: List of media identifiers.
int $position: Position of the paragraph.
1 call to ThunderParagraphsTestTrait::addGalleryParagraph()
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 168
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function addGalleryParagraph($fieldName, $name, array $media, $position = NULL) {
$paragraphIndex = $this
->addParagraph($fieldName, 'gallery', $position);
$this
->createGallery($name, "{$fieldName}_{$paragraphIndex}_subform_field_media", $media);
}