You are here

function ds_render in Display Suite 6.2

Same name and namespace in other branches
  1. 6.3 includes/ds.api.inc \ds_render()

API function to return rendered content for an item

Parameters

string $key: A key for the object, e.g. an NID

stdClass $object: The object to manipulate, e.g. a $node object

string $module: The name of the module requesting the render

array $vars: The variables required for rendering

Return value

a string containing the fully rendered display

1 call to ds_render()
ds_make in ./ds.module
API function to build and render a build mode for a given object

File

./ds.module, line 309
Core functions for the Display Suite module.

Code

function ds_render($key, $object, $module, $vars) {
  static $renders = array();
  if (isset($renders[$module][$object->build_mode][$key])) {
    return $renders[$module][$object->build_mode][$key];
  }

  // ds_render_content in this context is correct.
  // The function is marked deprecated as THIS function is the
  // replacement.
  $renders[$module][$object->build_mode][$key] = ds_render_content($object, $module, $vars);
  return $renders[$module][$object->build_mode][$key];
}