You are here

function hook_ds_views_row_render_entity_alter in Display Suite 8.3

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

Theme an entity through an advanced function.

Function is coming from the views entity plugin.

Parameters

array $build: The builded entity.

array $context: Collection of parameters (row, view and view_mode).

1 invocation of hook_ds_views_row_render_entity_alter()
RendererBase::dsPreRender in src/Plugin/views/Entity/Render/RendererBase.php
Pre renders all the Display Suite rows.

File

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

Code

function hook_ds_views_row_render_entity_alter(array &$build, array $context) {

  // You can do whatever you want to here.
  $build['data'] = [
    '#markup' => 'Sample text',
    '#weight' => 20,
  ];
}