commerce-8.x-2.8/modules/product/src/ProductVariationTypeListBuilder.php
modules/product/src/ProductVariationTypeListBuilder.php
<?php
namespace Drupal\commerce_product;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Defines the list builder for product variation types.
*/
class ProductVariationTypeListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['name'] = $this->t('Product variation type');
$header['type'] = $this->t('Machine name');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
$row = [];
$row['name'] = $entity->label();
$row['type'] = $entity->id();
return $row + parent::buildRow($entity);
}
}
