public function SiteAlertListBuilder::buildRow in Site Alert 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
- src/
SiteAlertListBuilder.php, line 54
Class
- SiteAlertListBuilder
- Implements SiteAlertListBuilder class.
Namespace
Drupal\site_alertCode
public function buildRow(EntityInterface $entity) {
$row = [
'active' => $entity
->getActive() ? $this
->t('Active') : $this
->t('Not Active'),
'label' => $entity
->label(),
'message' => check_markup($entity
->get('message')->value, $entity
->get('message')->format),
'scheduling__value' => $entity
->getStartTime(),
'scheduling__end_value' => $entity
->getEndTime(),
];
return $row + parent::buildRow($entity);
}