protected function TabularBaseWebformExporter::getElements in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformExporter/TabularBaseWebformExporter.php \Drupal\webform\Plugin\WebformExporter\TabularBaseWebformExporter::getElements()
Get webform elements.
Return value
array An associative array containing webform elements keyed by name.
2 calls to TabularBaseWebformExporter::getElements()
- TabularBaseWebformExporter::buildHeader in src/
Plugin/ WebformExporter/ TabularBaseWebformExporter.php - Build export header using webform submission field definitions and webform element columns.
- TabularBaseWebformExporter::buildRecord in src/
Plugin/ WebformExporter/ TabularBaseWebformExporter.php - Build export record using a webform submission.
File
- src/
Plugin/ WebformExporter/ TabularBaseWebformExporter.php, line 216
Class
- TabularBaseWebformExporter
- Defines abstract tabular exporter used to build CSV files and HTML tables.
Namespace
Drupal\webform\Plugin\WebformExporterCode
protected function getElements() {
if (isset($this->elements)) {
return $this->elements;
}
$export_options = $this
->getConfiguration();
$this->elements = $this
->getWebform()
->getElementsInitializedFlattenedAndHasValue('view');
// Replace tokens which can be used in an element's #title.
$this->elements = $this->tokenManager
->replace($this->elements, $this
->getWebform());
if ($export_options['excluded_columns']) {
$this->elements = array_diff_key($this->elements, $export_options['excluded_columns']);
}
return $this->elements;
}