You are here

function ds_panels_content in Display Suite 7

Return the panels content manager.

1 call to ds_panels_content()
ds_panels_field_ui in modules/ds_extras/ds_extras.panels.inc
Manage display screen with panels editor.

File

modules/ds_extras/ds_extras.panels.inc, line 423
Administrative functions for DS panels.

Code

function ds_panels_content($entity_type, $bundle, $view_mode, $ds_layout) {
  if (empty($ds_layout)) {
    return array(
      '#markup' => '<p>' . t('Select a layout first.') . '</p>',
    );
  }
  $did = $ds_layout['settings']['did'];
  ctools_include('common', 'panels');
  $display = panels_load_display($did);
  $display->context = ds_get_entity_context($entity_type);
  $content_types = panels_common_get_allowed_types('panels_ds', $display->context);
  $panel_display = panels_edit($display, $_GET['q'], $content_types);

  // Remove the preview and render the panels content form.
  $panel_display['preview']['#access'] = FALSE;
  return $panel_display;
}