public function LayoutPluginManager::getLayoutOptions in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()
- 10 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions()
Returns an array of layout labels grouped by category.
Return value
string[][] A nested array of labels suitable for #options.
Overrides LayoutPluginManagerInterface::getLayoutOptions
File
- core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManager.php, line 230
Class
- LayoutPluginManager
- Provides a plugin manager for layouts.
Namespace
Drupal\Core\LayoutCode
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;
}