public function WebformSubmissionBulkForm::buildForm in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Form/WebformSubmissionBulkForm.php \Drupal\webform\Form\WebformSubmissionBulkForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides WebformBulkFormBase::buildForm
File
- src/
Form/ WebformSubmissionBulkForm.php, line 27
Class
- WebformSubmissionBulkForm
- Provides the webform submission bulk form.
Namespace
Drupal\webform\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $table = [], $submission_delete_any = FALSE) {
// Track if the user can delete any submission.
$this->submissionDeleteAny = $submission_delete_any;
// Restructure the table rows so that they can be displayed as
// table select options.
foreach ($table['#rows'] as $key => $row) {
$table['#rows'][$key] = $row['data'] + [
'#attributes' => [
'data-webform-href' => $row['data-webform-href'],
],
];
}
return parent::buildForm($form, $form_state, $table);
}