Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LayoutPluginManager.php

function LayoutPluginManager::getThemeImplementations

File

core/lib/Drupal/Core/Layout/LayoutPluginManager.php, line 162

Class

LayoutPluginManager
Provides a plugin manager for layouts.

Namespace

Drupal\Core\Layout

Code

public function getThemeImplementations() {
    $hooks = [];
    $hooks['layout'] = [
        'render element' => 'content',
    ];
    
    /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */
    $definitions = $this->getDefinitions();
    foreach ($definitions as $definition) {
        if ($template = $definition->getTemplate()) {
            $hooks[$definition->getThemeHook()] = [
                'render element' => 'content',
                'base hook' => 'layout',
                'template' => $template,
                'path' => $definition->getTemplatePath(),
            ];
        }
    }
    return $hooks;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal