public function DeploymentListBuilder::buildRow in Build Hooks 8.2
Same name and namespace in other branches
- 3.x src/DeploymentListBuilder.php \Drupal\build_hooks\DeploymentListBuilder::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
- src/
DeploymentListBuilder.php, line 27
Class
- DeploymentListBuilder
- Defines a list builder for deployments.
Namespace
Drupal\build_hooksCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\build_hooks\Entity\DeploymentInterface $entity */
return [
'label' => $entity
->label(),
'environment' => $entity
->bundle(),
'status' => $entity
->isDeployed() ? $this
->t('Deployed') : $this
->t('Pending'),
] + parent::buildRow($entity);
}