LayoutBuilderThemeSuggestionsTestHooks.php

Namespace

Drupal\layout_builder_theme_suggestions_test\Hook

File

core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/src/Hook/LayoutBuilderThemeSuggestionsTestHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\layout_builder_theme_suggestions_test\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for layout_builder_theme_suggestions_test.
 */
class LayoutBuilderThemeSuggestionsTestHooks {
    
    /**
     * Implements hook_theme().
     */
    public function theme() : array {
        // It is necessary to explicitly register the template via hook_theme()
        // because it is added via a module, not a theme.
        return [
            'field__node__body__bundle_with_section_field__default' => [
                'base hook' => 'field',
            ],
        ];
    }

}

Classes

Title Deprecated Summary
LayoutBuilderThemeSuggestionsTestHooks Hook implementations for layout_builder_theme_suggestions_test.

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