public function ContactListBuilder::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_contact/ src/ ContactListBuilder.php, line 30
Class
- ContactListBuilder
- Defines a class to build a listing of Contact entities.
Namespace
Drupal\redhen_contactCode
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\redhen_contact\Entity\Contact */
$row['type'] = $entity
->getType();
$row['name'] = $entity
->toLink()
->toString();
$row['email'] = $entity
->getEmail();
$row['status'] = $entity
->isActive() ? $this
->t('Active') : $this
->t('Inactive');
return $row + parent::buildRow($entity);
}