You are here

public function WebformSubmissionStorage::getCustomColumns in Webform 8.5

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

Get customized submission columns used to display custom table.

Parameters

\Drupal\webform\WebformInterface|null $webform: A webform.

\Drupal\Core\Entity\EntityInterface|null $source_entity: A webform submission source entity.

\Drupal\Core\Session\AccountInterface|null $account: A user account.

bool $include_elements: Flag that include all form element in the list of columns.

Return value

array An associative array of columns keyed by name.

Overrides WebformSubmissionStorageInterface::getCustomColumns

File

src/WebformSubmissionStorage.php, line 615

Class

WebformSubmissionStorage
Defines the webform submission storage.

Namespace

Drupal\webform

Code

public function getCustomColumns(WebformInterface $webform = NULL, EntityInterface $source_entity = NULL, AccountInterface $account = NULL, $include_elements = TRUE) {
  $column_names = $this
    ->getCustomSetting('columns', [], $webform, $source_entity) ?: $this
    ->getDefaultColumnNames($webform, $source_entity, $account, $include_elements);
  $columns = $this
    ->getColumns($webform, $source_entity, $account, $include_elements);
  return $this
    ->filterColumns($column_names, $columns);
}