tripal_chado/src/ListBuilders/ChadoTermMappingListBuilder.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

namespace Drupal\tripal_chado\ListBuilders;

use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;

/**
 * Provides a listing of Chado Term Mapping config entities.
 */
class ChadoTermMappingListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = $this->t('Name');
    $header['id'] = $this->t('ID');
    $header['description'] = $this->t('Description');
    return $header + parent::buildHeader();
  }

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $entity->label();
    $row['id'] = $entity->id();
    $row['description'] = $entity->description();

    // You probably want a few more properties here...

    return $row + parent::buildRow($entity);
  }

}