You are here

function theme_panels_bootstrap in Panels Bootstrap Layout Builder 7

Same name and namespace in other branches
  1. 7.3 plugins/layouts/bootstrap/bootstrap.inc \theme_panels_bootstrap()

Draw the bootstrap layout.

1 call to theme_panels_bootstrap()
theme_panels_bootstrap_admin in plugins/layouts/bootstrap/bootstrap.inc
Draw the bootstrap layout.

File

plugins/layouts/bootstrap/bootstrap.inc, line 348

Code

function theme_panels_bootstrap($vars) {
  $css_id = $vars['css_id'];
  $content = $vars['content'];
  $settings = $vars['settings'];
  $display = $vars['display'];
  $layout = $vars['layout'];
  $handler = $vars['renderer'];
  panels_bootstrap_convert_settings($settings, $layout);
  $renderer = panels_bootstrap_create_renderer(FALSE, $css_id, $content, $settings, $display, $layout, $handler);
  if (isset($renderer->settings['items']['canvas']['grid_type'])) {
    $grid_type = $renderer->settings['items']['canvas']['grid_type'];
  }
  else {
    $grid_type = 'row';
  }
  $output = "<div class=\"panel-bootstrap " . $renderer->base['canvas'] . " clearfix\" {$renderer->id_str}>\n";
  $output .= "<div class=\"" . $grid_type . " panel-bootstrap-inside " . $renderer->base['canvas'] . "-inside\">\n";
  $output .= panels_bootstrap_render_items($renderer, $settings['items']['canvas']['children'], $renderer->base['canvas']);

  // Wrap the whole thing up nice and snug
  $output .= "</div>\n</div>\n";
  return $output;
}