You are here

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

Insert a paragraph component before 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 379

Class

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

Namespace

Drupal\layout_paragraphs

Code

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