You are here

class ConfigTestListBuilder in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config/tests/config_test/src/ConfigTestListBuilder.php \Drupal\config_test\ConfigTestListBuilder
  2. 9 core/modules/config/tests/config_test/src/ConfigTestListBuilder.php \Drupal\config_test\ConfigTestListBuilder

Defines a class to build a listing of ConfigTest entities.

Hierarchy

Expanded class hierarchy of ConfigTestListBuilder

See also

\Drupal\config_test\Entity\ConfigTest

File

core/modules/config/tests/config_test/src/ConfigTestListBuilder.php, line 13

Namespace

Drupal\config_test
View source
class ConfigTestListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = t('Label');
    $header['id'] = t('Machine name');
    return $header + parent::buildHeader();
  }

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

}

Members