protected function WebformSubmissionExporter::appendExporterToStates in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionExporter.php \Drupal\webform\WebformSubmissionExporter::appendExporterToStates()
Append exporter plugin id to #states API array.
Parameters
array $states: A #states API array.
string $plugin_id: The exporter plugin id.
1 call to WebformSubmissionExporter::appendExporterToStates()
- WebformSubmissionExporter::buildExportOptionsForm in src/
WebformSubmissionExporter.php - Build export options webform.
File
- src/
WebformSubmissionExporter.php, line 755
Class
- WebformSubmissionExporter
- Webform submission exporter.
Namespace
Drupal\webformCode
protected function appendExporterToStates(array &$states, $plugin_id) {
$state = key($states);
if ($states[$state]) {
$states[$state][] = 'or';
}
$states[$state][] = [
':input[name="exporter"]' => [
'value' => $plugin_id,
],
];
}