You are here

protected function LayoutBuilderDependencyCalculatorTest::getSectionComponents in Dependency Calculation 8

Gets an array of section components for testing dependencies.

Return value

\Drupal\layout_builder\SectionComponent[]

1 call to LayoutBuilderDependencyCalculatorTest::getSectionComponents()
LayoutBuilderDependencyCalculatorTest::setUp in tests/src/Kernel/EventSubscriber/LayoutBuilderDependencyCalculatorTest.php

File

tests/src/Kernel/EventSubscriber/LayoutBuilderDependencyCalculatorTest.php, line 186

Class

LayoutBuilderDependencyCalculatorTest
Class LayoutBuilderDependencyCalculatorTest.

Namespace

Drupal\Tests\depcalc\Kernel

Code

protected function getSectionComponents() {
  return [
    // Inline block.
    new SectionComponent('01e80474-531b-46bc-8e0c-c3dbffb0e099', 'content', [
      'id' => 'inline_block:basic',
      'label' => 'Bar Block',
      'provider' => 'layout_builder',
      'label_display' => 'visible',
      'view_mode' => 'full',
      'block_revision_id' => 1,
      'block_serialized' => NULL,
      'context_mapping' => [],
    ]),
    // Regular content block
    new SectionComponent('e4ee411c-305d-4696-bada-3b7f41b5611b', 'content', [
      'id' => 'block_content:865b56c1-134c-401e-88bc-f37d36dbc885',
      'label' => 'Non-Inline Block',
      'provider' => 'block_content',
      'label_display' => 'visible',
      'status' => TRUE,
      'info' => '',
      'view_mode' => 'full',
      'context_mapping' => [],
    ]),
    // Export a view
    new SectionComponent('8c2741f3-7f82-47c5-a382-dcf4e216874f', 'content', [
      'id' => 'views_block:who_s_online-who_s_online_block',
      'label' => '',
      'provider' => 'views',
      'label_display' => 'visible',
      'views_label' => '',
      'items_per_page' => 'none',
      'context_mapping' => [],
    ]),
  ];
}