You are here

function panels_get_layout in Panels 5

Same name and namespace in other branches
  1. 5.2 includes/plugins.inc \panels_get_layout()
  2. 6.3 includes/plugins.inc \panels_get_layout()
  3. 6.2 includes/plugins.inc \panels_get_layout()
  4. 7.3 includes/plugins.inc \panels_get_layout()
3 calls to panels_get_layout()
panels_panels_page in ./panels.module
panels_print_layout in ./panels.module
For external use: Given a layout ID and a $content array, return the finished layout.
theme_panels_edit_form in ./panels.module
Display the form to edit a panels.

File

./panels.module, line 768

Code

function panels_get_layout($layout, $content) {
  $output = theme($layout['theme'], check_plain($layout['css_id']), $content);
  if ($output) {
    if (file_exists(path_to_theme() . '/' . $layout['css'])) {
      drupal_add_css(path_to_theme() . '/' . $layout['css']);
    }
    else {
      drupal_add_css(drupal_get_path('module', $layout['module']) . '/' . $layout['css']);
    }
  }
  return $output;
}