You are here

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

Returns a list of root level components for this collection.

Return value

array An array of root level layout paragraph components.

File

src/LayoutParagraphsLayout.php, line 239

Class

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

Namespace

Drupal\layout_paragraphs

Code

public function getRootComponents() {
  return array_filter($this
    ->getComponents(), function ($component) {
    return $component
      ->isRoot();
  });
}