public function OrgListBuilder::buildRow in RedHen CRM 8
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides EntityListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- modules/
redhen_org/ src/ OrgListBuilder.php, line 27
Class
- OrgListBuilder
- Defines a class to build a listing of Org entities.
Namespace
Drupal\redhen_orgCode
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\redhen_org\Entity\Org */
$row['type'] = $entity
->getType();
$row['name'] = $entity
->toLink()
->toString();
$row['status'] = $entity
->isActive() ? $this
->t('Active') : $this
->t('Inactive');
return $row + parent::buildRow($entity);
}