QuantityListBuilder.php in farmOS 2.x
File
modules/core/quantity/src/QuantityListBuilder.php
View source
<?php
namespace Drupal\quantity;
use Drupal\Core\Entity\EntityInterface;
use Drupal\entity\BulkFormEntityListBuilder;
class QuantityListBuilder extends BulkFormEntityListBuilder {
public function buildHeader() {
$header['id'] = $this
->t('ID');
$header['label'] = $this
->t('Label');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['id'] = [
'#markup' => $entity
->id(),
];
$row['name'] = $entity
->toLink($entity
->label(), 'canonical')
->toRenderable();
return $row + parent::buildRow($entity);
}
}