You are here

function ds_dsc_content_type_render in Display Suite 7.2

Same name and namespace in other branches
  1. 7 plugins/content_types/dsc/dsc.inc \ds_dsc_content_type_render()

Output function for the 'Display Suite' content type.

File

plugins/content_types/dsc/dsc.inc, line 30
Plugin to handle the Display Suite content type.

Code

function ds_dsc_content_type_render($subtype, $conf, $panel_args, $context, $incoming) {
  $block = new stdClass();
  $field = array();
  $entity = array_shift($context);
  $field['entity'] = isset($entity->data) ? $entity->data : NULL;
  $field['properties']['code']['format'] = $conf['format'];
  $field['properties']['code']['value'] = $conf['body'];
  $block->module = 'ds';
  $block->title = $conf['title'];
  $block->content = ds_render_code_field($field);
  return $block;
}