protected function MultiWidthLayoutBase::getDefaultWidth in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::getDefaultWidth()
- 9 core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::getDefaultWidth()
Provides a default value for the width options.
Return value
string A key from the array returned by ::getWidthOptions().
File
- core/
modules/ layout_builder/ src/ Plugin/ Layout/ MultiWidthLayoutBase.php, line 80
Class
- MultiWidthLayoutBase
- Base class of layouts with configurable widths.
Namespace
Drupal\layout_builder\Plugin\LayoutCode
protected function getDefaultWidth() {
// Return the first available key from the list of options.
$width_classes = array_keys($this
->getWidthOptions());
return array_shift($width_classes);
}