You are here

protected function WebformSubmissionForm::actionsElement in Webform 8.5

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

Returns the action form element for the current entity form.

Overrides EntityForm::actionsElement

File

src/WebformSubmissionForm.php, line 1382

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

protected function actionsElement(array $form, FormStateInterface $form_state) {

  // Custom webforms, which completely override the ContentEntityForm, should
  // not return the actions element (aka submit buttons).
  if (!empty($form['#custom_form'])) {
    return NULL;
  }
  $element = parent::actionsElement($form, $form_state);
  if (!empty($element)) {
    $element['#theme'] = 'webform_actions';
  }
  return $element;
}