You are here

function ds_test_ds_pre_render_alter in Display Suite 8.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.3 tests/modules/ds_test/ds_test.module \ds_test_ds_pre_render_alter()
  3. 7.2 tests/ds_test.module \ds_test_ds_pre_render_alter()

Implements hook_ds_pre_render_alter().

File

tests/modules/ds_test/ds_test.module, line 110
Display Suite test module.

Code

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