You are here

public function EntityMenuLinkCloneForm::buildForm in Menu Link Clone 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/EntityMenuLinkCloneForm.php \Drupal\menu_link_clone\Form\EntityMenuLinkCloneForm::buildForm()
  2. 8 src/Form/EntityMenuLinkCloneForm.php \Drupal\menu_link_clone\Form\EntityMenuLinkCloneForm::buildForm()

Return value

array A render form array for a page.

Overrides EntityCloneForm::buildForm

File

src/Form/EntityMenuLinkCloneForm.php, line 70

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;
}