public function GatsbyLogEntityListBuilder::buildRow in Gatsby Live Preview & Incremental Builds 8
Same name and namespace in other branches
- 2.0.x modules/gatsby_fastbuilds/src/GatsbyLogEntityListBuilder.php \Drupal\gatsby_fastbuilds\GatsbyLogEntityListBuilder::buildRow()
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/
gatsby_fastbuilds/ src/ GatsbyLogEntityListBuilder.php, line 70
Class
- GatsbyLogEntityListBuilder
- Defines a class to build a listing of Gatsby log entity entities.
Namespace
Drupal\gatsby_fastbuildsCode
public function buildRow(EntityInterface $entity) {
if (!$entity instanceof GatsbyLogEntity) {
return parent::buildRow($entity);
}
$row['id'] = $entity
->id();
$row['title'] = $entity
->getTitle();
$row['entity_uuid'] = $entity
->get('entity_uuid')->value;
$row['entity'] = $entity
->get('entity')->value;
$row['bundle'] = $entity
->get('bundle')->value;
$row['langcode'] = $entity
->get('langcode')->value;
$row['action'] = $entity
->get('action')->value;
$row['created'] = $this->dateFormatter
->format($entity
->getCreatedTime());
return $row;
}