function hook_ds_views_row_render_entity in Display Suite 8.2
Same name and namespace in other branches
- 8.4 ds.api.php \hook_ds_views_row_render_entity()
- 8.3 ds.api.php \hook_ds_views_row_render_entity()
Theme an entity through an advanced function.
The function is coming from the views entity plugin.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity.
string $view_mode: The name of the view mode.
Return value
array The rendered entity
1 function implements hook_ds_views_row_render_entity()
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_views_row_render_entity in tests/
modules/ ds_test/ ds_test.module - Helper function to return advanced view mode.
1 invocation of hook_ds_views_row_render_entity()
- RendererBase::dsPreRender in src/
Plugin/ views/ Entity/ Render/ RendererBase.php - Pre renders all the Display Suite rows.
File
- ./
ds.api.php, line 154 - Hooks provided by Display Suite module.
Code
function hook_ds_views_row_render_entity(\Drupal\Core\Entity\EntityInterface $entity, $view_mode) {
$entity = Drupal\ds\Plugin\DsField\Node::load(1);
return \Drupal::entityManager()
->getViewBuilder('node')
->view($entity, $view_mode);
}