| 1 render_example.module | render_example_add_suffix($element) | 
A '#pre_render' function.
Parameters
array $element: The element which will be rendered.
Return value
array: The altered element. In this case we add a #prefix to it.
Related topics
File
- modules/examples/ render_example/ render_example.module, line 217 
- Hook implementations for the Render Example module.
Code
function render_example_add_suffix($element) {
  $element['#suffix'] = '<div style="color:red">' . t('This #suffix was added by a #pre_render') . '</div>';
  // @todo Correct the following code, since the workaround is not necessary.
  // See https://www.drupal.org/node/914792
  $element['#children'] = $element['#markup'];
  return $element;
}
