You are here

function ultimenu_build_data_region in Ultimenu 7

Build a renderable array for Ultimenu regions.

See also

ultimenu_tree_output()

1 call to ultimenu_build_data_region()
ultimenu_tree_output in ./ultimenu.module
We use tree for future integration with regular dropdown so far.

File

./ultimenu.module, line 302
Build Ultimenu regions based on enabled menu and its available menu items.

Code

function ultimenu_build_data_region(&$variables) {
  $build = array();
  if ($content = ultimenu_block_get_blocks_by_region($variables['region'])) {
    $build['content'] = $content;
    $build['#config'] = $variables['config'];
    $build['#sorted'] = TRUE;
    $build['#region'] = $variables['region'];

    // Add the theme wrapper for the Ultimenu flyout aka region wrapper.
    // Note the order: ultimenu_region should wrap region.
    $build['#theme_wrappers'] = array(
      'region',
      'ultimenu_region',
    );
  }
  return $build;
}