LayoutBuilderTestPlugin.php

Same filename in other branches
  1. 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php
  2. 8.9.x core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php
  3. 10 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php

Namespace

Drupal\layout_builder_test\Plugin\Layout

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php

View source
<?php

declare (strict_types=1);
namespace Drupal\layout_builder_test\Plugin\Layout;

use Drupal\Core\Layout\Attribute\Layout;
use Drupal\Core\Layout\LayoutDefault;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * The Layout Builder Test Plugin.
 */
class LayoutBuilderTestPlugin extends LayoutDefault {
    
    /**
     * {@inheritdoc}
     */
    public function build(array $regions) {
        $build = parent::build($regions);
        $build['main']['#attributes']['class'][] = 'go-birds';
        if ($this->inPreview) {
            $build['main']['#attributes']['class'][] = 'go-birds-preview';
        }
        return $build;
    }

}

Classes

Title Deprecated Summary
LayoutBuilderTestPlugin The Layout Builder Test Plugin.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.