You are here

public function EditForm::buildForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/path/src/Form/EditForm.php \Drupal\path\Form\EditForm::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 PathFormBase::buildForm

File

core/modules/path/src/Form/EditForm.php, line 35
Contains \Drupal\path\Form\EditForm.

Class

EditForm
Provides the path edit form.

Namespace

Drupal\path\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $pid = NULL) {
  $form = parent::buildForm($form, $form_state, $pid);
  $form['#title'] = $this->path['alias'];
  $form['pid'] = array(
    '#type' => 'hidden',
    '#value' => $this->path['pid'],
  );
  $form['actions']['delete'] = array(
    '#type' => 'submit',
    '#value' => $this
      ->t('Delete'),
    '#submit' => array(
      '::deleteSubmit',
    ),
  );
  return $form;
}