function LayoutPluginManager::getLayoutOptions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()
  2. 10 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()
  3. 11.x core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()

Overrides LayoutPluginManagerInterface::getLayoutOptions

File

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

Class

LayoutPluginManager
Provides a plugin manager for layouts.

Namespace

Drupal\Core\Layout

Code

public function getLayoutOptions() {
    $layout_options = [];
    foreach ($this->getGroupedDefinitions() as $category => $layout_definitions) {
        foreach ($layout_definitions as $name => $layout_definition) {
            $layout_options[$category][$name] = $layout_definition->getLabel();
        }
    }
    return $layout_options;
}

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