commerce_product_bundles-8.x-1.0/src/ProductBundleVariationTypeListBuilder.php
src/ProductBundleVariationTypeListBuilder.php
<?php
namespace Drupal\commerce_product_bundles;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Class ProductBundleVariationTypeListBuilder
*
* @package Drupal\commerce_product_bundles
*/
class ProductBundleVariationTypeListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['name'] = $this->t('Product bundle 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);
}
}
