You are here

function ds_test_ds_pre_render_alter in Display Suite 7.2

Same name and namespace in other branches
  1. 8.4 tests/modules/ds_test/ds_test.module \ds_test_ds_pre_render_alter()
  2. 8.2 tests/modules/ds_test/ds_test.module \ds_test_ds_pre_render_alter()
  3. 8.3 tests/modules/ds_test/ds_test.module \ds_test_ds_pre_render_alter()

Implements hook_ds_pre_render_alter().

File

tests/ds_test.module, line 316
Display Suite test module.

Code

function ds_test_ds_pre_render_alter(&$layout_render_array, $context) {
  $entity = $context['entity'];
  if (isset($entity->title) && $entity->title === 'Alter me!') {
    $layout_render_array['left'][] = array(
      '#markup' => 'cool!',
      '#weight' => 20,
    );
  }
}