function LayoutPluginManager::getLayoutOptions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()
  2. 8.9.x 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()

File

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

Class

LayoutPluginManager
Provides a plugin manager for layouts.

Namespace

Drupal\Core\Layout

Code

public function getLayoutOptions() {
    $layout_options = [];
    $filtered_definitions = $this->getFilteredDefinitions($this->getType());
    foreach ($this->getGroupedDefinitions($filtered_definitions) 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.