You are here

public function EntityMenuLinkCloneForm::buildForm in Menu Link Clone 8

Same name and namespace in other branches
  1. 8.3 src/Form/EntityMenuLinkCloneForm.php \Drupal\menu_link_clone\Form\EntityMenuLinkCloneForm::buildForm()
  2. 8.2 src/Form/EntityMenuLinkCloneForm.php \Drupal\menu_link_clone\Form\EntityMenuLinkCloneForm::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 EntityCloneForm::buildForm

File

src/Form/EntityMenuLinkCloneForm.php, line 24

Class

EntityMenuLinkCloneForm
Provides a menu link clone form.

Namespace

Drupal\menu_link_clone\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $form['clone_links'] = [
    '#type' => 'checkbox',
    '#title' => t('Clone with Links'),
    '#required' => FALSE,
    '#default_value' => FALSE,
    '#weight' => 0,
  ];
  return $form;
}