1 layout.module layout_load($layout_name, $skip_menu_items = NULL)

Load an individual layout.

Parameters

string $layout_name: The layout machine name to load.

bool $skip_menu_items: Flag to skip the attempted loading of menu items for the loaded layouts. This should be set to TRUE if loading layouts that definitely do not have menu items associated with them, for example the default layouts or a layout that overrides an existing menu path.

Return value

Layout|boolean:

File

core/modules/layout/layout.module, line 1051
The Layout module creates pages and wraps existing pages in layouts.

Code

function layout_load($layout_name, $skip_menu_items = NULL) {
  // Skip menu item loading for default layouts, as we know they do not have
  // an associated menu item.
  if (is_null($skip_menu_items)) {
    $skip_menu_items = in_array($layout_name, array('default', 'admin_default'));
  }

  $layouts = layout_load_multiple(array($layout_name), $skip_menu_items);
  return $layouts[$layout_name];
}