TagSetListBuilder.php in Extensible BBCode 8.3
File
src/TagSetListBuilder.php
View source
<?php
namespace Drupal\xbbcode;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
class TagSetListBuilder extends EntityListBuilder {
public function buildHeader() : array {
$header['label'] = $this
->t('Name');
$header['tags'] = $this
->t('Tags');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) : array {
$row['label'] = $entity
->label();
$row['tags']['data'] = $entity
->getPluginCollection()
->getSummary();
return $row + parent::buildRow($entity);
}
}