You are here

public function FieldClonerForm::buildForm in Scheduled Updates 8

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 FormInterface::buildForm

File

src/Form/FieldClonerForm.php, line 80
Contains \Drupal\scheduled_updates\Form\FieldClonerForm.

Class

FieldClonerForm
Class FieldClonerForm.

Namespace

Drupal\scheduled_updates\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, ScheduledUpdateTypeInterface $scheduled_update_type = NULL) {
  $this->entity = $scheduled_update_type;
  $form += $this
    ->createFieldsElements($form_state);
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Clone Fields'),
  ];
  return $form;
}