You are here

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

Returns a list of all components for this collection.

Return value

array An array of layout paragraph components.

2 calls to LayoutParagraphsLayout::getComponents()
LayoutParagraphsLayout::getLayoutSection in src/LayoutParagraphsLayout.php
Returns a Layout Paragraphs Layout Section for the given paragraph.
LayoutParagraphsLayout::getRootComponents in src/LayoutParagraphsLayout.php
Returns a list of root level components for this collection.

File

src/LayoutParagraphsLayout.php, line 251

Class

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

Namespace

Drupal\layout_paragraphs

Code

public function getComponents() {
  return array_map(function ($paragraph) {
    return $this
      ->getComponent($paragraph);
  }, $this
    ->getEntities());
}