DashboardListBuilder.php in Draggable dashboard 8.2
File
src/DashboardListBuilder.php
View source
<?php
namespace Drupal\draggable_dashboard;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class DashboardListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Title');
$header['description'] = $this
->t('Description');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label() . ' (' . $entity
->id() . ')';
$row['description'] = $entity
->get('description');
return $row + parent::buildRow($entity);
}
}