Get labels from fields ordered on block plugin - Drupal 8 I'm trying to create a block with a label list using all labels of a specific field type, entity_reference_revisions.

I created a Block plugin and load the EntityTypeManager service.
I tried:

    $values = array(
      'targetEntityType' =&gt; 'node',
      'bundle' =&gt; $bundle,
      'mode' =&gt; $view_mode,
      'status' =&gt; TRUE,
    );
    $entity_view_display = $this-&gt;entityType-&gt;getStorage('entity_view_display')-&gt;create($values);
    $fields = $entity_view_display-&gt;get('fieldDefinitions');
    $labels = [];
    foreach ($fields as $field) {
      if($field-&gt;getFieldStorageDefinition()-&gt;getType() == 'entity_reference_revisions') {
        $labels[] = $field-&gt;get('label');
      }
    }


The problem is that I get the fields in a wrong order, and I can't get the weight attribute.
I solved it loading the field definition using entityManager, I got the weight attribute, and then ordered the labels by weight.

$node = $this-&gt;requestStack-&gt;getCurrentRequest()-&gt;get('node');
$bundle = $node-&gt;getType();
$view_mode = 'full';

$fields = [];
foreach($this-&gt;entityManager-&gt;getFieldDefinitions('node', $bundle)  as $field_name =&gt; $field_definition) {
  if($field_definition-&gt;getType() == 'entity_reference_revisions') {
    $field_name = $field_definition-&gt;getName();
    $element = $node-&gt;$field_name-&gt;view($view_mode);
    $fields[] = [
      'name' =&gt; $field_name,
      'label' =&gt; $field_definition-&gt;getLabel(),
      'weight' =&gt; $element['#weight'],
    ];

  }
}

usort($fields, [$this, 'sortByWeight']);