OrgListBuilder.php in RedHen CRM 8
File
modules/redhen_org/src/OrgListBuilder.php
View source
<?php
namespace Drupal\redhen_org;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
class OrgListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['type'] = $this
->t('Type');
$header['name'] = $this
->t('Name');
$header['status'] = $this
->t('Status');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['type'] = $entity
->getType();
$row['name'] = $entity
->toLink()
->toString();
$row['status'] = $entity
->isActive() ? $this
->t('Active') : $this
->t('Inactive');
return $row + parent::buildRow($entity);
}
}