You are here

protected function WebformSubmissionListBuilder::buildInfo in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionListBuilder.php \Drupal\webform\WebformSubmissionListBuilder::buildInfo()

Build information summary.

Return value

array A render array representing the information summary.

1 call to WebformSubmissionListBuilder::buildInfo()
WebformSubmissionListBuilder::buildEntityList in src/WebformSubmissionListBuilder.php
Build the webform submission entity list.

File

src/WebformSubmissionListBuilder.php, line 726

Class

WebformSubmissionListBuilder
Provides a list controller for webform submission entity.

Namespace

Drupal\webform

Code

protected function buildInfo() {
  if ($this->draft) {
    $info = $this
      ->formatPlural($this->total, '@total draft', '@total drafts', [
      '@total' => $this->total,
    ]);
  }
  else {
    $info = $this
      ->formatPlural($this->total, '@total submission', '@total submissions', [
      '@total' => $this->total,
    ]);
  }
  return [
    '#markup' => $info,
    '#prefix' => '<div>',
    '#suffix' => '</div>',
  ];
}