You are here

function _ds_fields_examples_render in Display Suite 6.3

Same name and namespace in other branches
  1. 6 includes/ds.fields.inc \_ds_fields_examples_render()
  2. 6.2 includes/ds.fields.inc \_ds_fields_examples_render()

Get the load/render info about an object.

1 call to _ds_fields_examples_render()
ds_fields_examples in includes/ds.fields.inc
Show examples for a field by loading the objects and preprocess variables.

File

includes/ds.fields.inc, line 778
Manage fields.

Code

function _ds_fields_examples_render($api_info, $type, &$output) {
  $object = $api_info['object'];
  $module = $api_info['module'];
  $examples_file = drupal_get_path('module', $module) . '/' . $module . '_fields_examples.inc';
  if (file_exists($examples_file)) {
    $output .= '<div style="margin: 10px 0px 10px 0px; padding-top: 10px; border-top: 1px solid #ddd"></div>';
    require_once $examples_file;
  }
  else {
    drupal_set_message('No info found.');
  }
}