You are here

function panels_stylizer_pane_preview in Panels 8.3

Same name and namespace in other branches
  1. 6.3 panels.module \panels_stylizer_pane_preview()
  2. 7.3 panels.module \panels_stylizer_pane_preview()

Generate a preview given the current settings.

1 string reference to 'panels_stylizer_pane_preview'
panels_ctools_style_base_types in ./panels.module
Declare what style types Panels uses.

File

./panels.module, line 248
panels.module

Code

function panels_stylizer_pane_preview($plugin, $settings) {
  ctools_stylizer_add_css($plugin, $settings);
  $pane = new stdClass();
  $content = new stdClass();
  $content->title = t('Lorem ipsum');
  $content->content = panels_stylizer_lipsum();
  $content->type = 'dummy';
  $content->subtype = 'dummy';
  $content->css_class = ctools_stylizer_get_css_class($plugin, $settings);
  $display = new panels_display();
  if (!empty($plugin['theme'])) {
    return theme($plugin['theme'], array(
      'settings' => $settings,
      'content' => $content,
      'pane' => $pane,
      'display' => $display,
    ));
  }
  else {
    return theme('panels_pane', array(
      'content' => $content,
      'pane' => $pane,
      'display' => $display,
    ));
  }
}