You are here

public function ConfigTranslationFieldListBuilder::buildRow in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::buildRow()
  2. 9 core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::buildRow()

Builds a row for an entity in the entity listing.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.

Return value

array A render array structure of fields for this entity.

Overrides ConfigTranslationEntityListBuilder::buildRow

See also

\Drupal\Core\Entity\EntityListBuilder::render()

File

core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php, line 123

Class

ConfigTranslationFieldListBuilder
Defines the config translation list builder for field entities.

Namespace

Drupal\config_translation\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = [
    'data' => $entity
      ->label(),
    'class' => 'table-filter-text-source',
  ];
  if ($this
    ->displayBundle()) {
    $bundle = $entity
      ->get('bundle');
    $row['bundle'] = [
      'data' => $this->baseEntityBundles[$bundle]['label'],
      'class' => 'table-filter-text-source',
    ];
  }
  return $row + parent::buildRow($entity);
}