1 layout.theme.inc | _layout_page_component_blocks_exist($variables) |
Utility function to return if a title component block is in a layout.
File
- core/
modules/ layout/ layout.theme.inc, line 415 - Theme functions for the Layout module.
Code
function _layout_page_component_blocks_exist($variables) {
$active_component_blocks = array();
foreach ($variables['layout']->content as $block) {
if ($block->delta == 'page_components') {
$active_component_blocks[] = $block->childDelta;
}
}
$block_exists['title'] = (in_array('title_combo', $active_component_blocks) || in_array('title', $active_component_blocks));
$block_exists['messages'] = (in_array('title_combo', $active_component_blocks) || in_array('messages', $active_component_blocks));
$block_exists['tabs'] = (in_array('title_combo', $active_component_blocks) || in_array('tabs', $active_component_blocks));
$block_exists['action_links'] = (in_array('title_combo', $active_component_blocks) || in_array('action_links', $active_component_blocks));
return $block_exists;
}