function system_default_region in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/system.module \system_default_region()
- 4 modules/system.module \system_default_region()
- 5 modules/system/system.module \system_default_region()
- 6 modules/system/system.module \system_default_region()
- 7 modules/system/system.module \system_default_region()
- 9 core/modules/system/system.module \system_default_region()
Gets the name of the default region for a given theme.
Parameters
$theme: The name of a theme.
Return value
A string that is the region name.
4 calls to system_default_region()
- Block::preSave in core/
modules/ block/ src/ Entity/ Block.php - Acts on an entity before the presave hook is invoked.
- BlockRebuildTest::testRebuildInvalidBlocks in core/
modules/ block/ tests/ src/ Kernel/ BlockRebuildTest.php - @covers ::block_rebuild
- block_rebuild in core/
modules/ block/ block.module - Implements hook_rebuild().
- block_theme_initialize in core/
modules/ block/ block.module - Assigns an initial, default set of blocks for a theme.
File
- core/
modules/ system/ system.module, line 942 - Configuration system that lets administrators modify the workings of the site.
Code
function system_default_region($theme) {
$regions = array_keys(system_region_list($theme, REGIONS_VISIBLE));
return $regions[0] ?? '';
}