You are here

protected function YamlFormSubmissionForm::actionsElement in YAML Form 8

Returns the action form element for the current entity form.

Overrides EntityForm::actionsElement

File

src/YamlFormSubmissionForm.php, line 496

Class

YamlFormSubmissionForm
Provides a form to collect and edit submissions.

Namespace

Drupal\yamlform

Code

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

  // Custom forms, 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'] = 'yamlform_actions';
  }
  return $element;
}