SpamicideListBuilder.php in Spamicide 8
File
src/SpamicideListBuilder.php
View source
<?php
namespace Drupal\spamicide;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class SpamicideListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Label');
$header['id'] = $this
->t('Form ID');
$header['status'] = $this
->t('Status');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
$row['status'] = $entity
->status() ? $this
->t('Enabled') : $this
->t('Disabled');
return $row + parent::buildRow($entity);
}
}