You are here

public function WebformSubmissionListBuilder::buildRow in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionListBuilder.php \Drupal\webform\WebformSubmissionListBuilder::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/WebformSubmissionListBuilder.php, line 831

Class

WebformSubmissionListBuilder
Provides a list controller for webform submission entity.

Namespace

Drupal\webform

Code

public function buildRow(EntityInterface $entity) {
  $url = $this->requestHandler
    ->getUrl($entity, $this->sourceEntity, $this
    ->getSubmissionRouteName());
  $row = [
    'data' => [],
    'data-webform-href' => $url
      ->toString(),
  ];
  foreach ($this->columns as $column_name => $column) {
    $row['data'][$column_name] = $this
      ->buildRowColumn($column, $entity);
  }
  return $row;
}