You are here

function hook_ds_pre_render_alter in Display Suite 7.2

Same name and namespace in other branches
  1. 8.4 ds.api.php \hook_ds_pre_render_alter()
  2. 8.2 ds.api.php \hook_ds_pre_render_alter()
  3. 8.3 ds.api.php \hook_ds_pre_render_alter()

Alter the layout render array.

Parameters

$layout_render_array: The render array

$context: An array with the context that is being rendered. Available keys are

  • entity
  • entity_type
  • bundle
  • view_mode

array $vars: All variables available for render. You can use this to add css classes.

1 function implements hook_ds_pre_render_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ds_test_ds_pre_render_alter in tests/ds_test.module
Implements hook_ds_pre_render_alter().
1 invocation of hook_ds_pre_render_alter()
ds_entity_variables in ./ds.module
Add variables to an entity.

File

./ds.api.php, line 431
Hooks provided by Display Suite module.

Code

function hook_ds_pre_render_alter(&$layout_render_array, $context, &$vars) {
  $layout_render_array['left'][] = array(
    '#markup' => 'cool!',
    '#weight' => 20,
  );
  $vars['attributes_array']['class'][] = 'custom';
}