protected function RendererBase::alterBuild in Display Suite 8.3
Alter the build.
Parameters
$build:
$row:
2 calls to RendererBase::alterBuild()
- RendererBase::render in src/
Plugin/ views/ Entity/ Render/ RendererBase.php - Renders entity data.
- TranslationLanguageRenderer::render in src/
Plugin/ views/ Entity/ Render/ TranslationLanguageRenderer.php - Renders entity data.
File
- src/
Plugin/ views/ Entity/ Render/ RendererBase.php, line 41
Class
- RendererBase
- Renders entities in the current language.
Namespace
Drupal\ds\Plugin\views\Entity\RenderCode
protected function alterBuild(&$build, $row) {
// Add row index. Remember that in case you want to use this, you will
// have to remove the cache for this build.
$build['#row_index'] = isset($row->index) ? $row->index : NULL;
// Delta fields.
$delta_fields = $this->view->rowPlugin->options['delta_fieldset']['delta_fields'];
if (!empty($delta_fields)) {
foreach ($delta_fields as $field) {
$field_name_delta = $field . '_delta';
if (isset($row->{$field_name_delta})) {
$build['#ds_delta'][$field] = $row->{$field_name_delta};
}
}
}
}