You are here

public function LayoutParagraphsLayout::insertAfterComponent in Layout Paragraphs 2.0.x

Insert a paragraph component after an existing component.

Parameters

string $sibling_uuid: The existing sibling paragraph component's uuid.

\Drupal\paragraphs\Entity\Paragraph $paragraph: The paragraph component to add.

Return value

$this

File

src/LayoutParagraphsLayout.php, line 393

Class

LayoutParagraphsLayout
Provides a domain object for a complete Layout Paragraphs Layout.

Namespace

Drupal\layout_paragraphs

Code

public function insertAfterComponent(string $sibling_uuid, Paragraph $paragraph) {
  return $this
    ->insertSiblingComponent($sibling_uuid, $paragraph, 1);
}