You are here

protected function EntityFieldRenderer::getRenderableFieldIds in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Entity/Render/EntityFieldRenderer.php \Drupal\views\Entity\Render\EntityFieldRenderer::getRenderableFieldIds()

Returns a list of names of entity fields to be rendered.

Return value

string[] An associative array of views fields.

1 call to EntityFieldRenderer::getRenderableFieldIds()
EntityFieldRenderer::buildFields in core/modules/views/src/Entity/Render/EntityFieldRenderer.php
Builds the render arrays for all fields of all result rows.

File

core/modules/views/src/Entity/Render/EntityFieldRenderer.php, line 297

Class

EntityFieldRenderer
Renders entity fields.

Namespace

Drupal\views\Entity\Render

Code

protected function getRenderableFieldIds() {
  $field_ids = [];
  foreach ($this->view->field as $field_id => $field) {
    if ($field instanceof EntityField && $field->relationship == $this->relationship) {
      $field_ids[] = $field_id;
    }
  }
  return $field_ids;
}