You are here

protected function EntityFieldRenderer::getRenderableFieldIds in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Entity/Render/EntityFieldRenderer.php \Drupal\views\Entity\Render\EntityFieldRenderer::getRenderableFieldIds()
  2. 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.

File

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

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;
}