You are here

public function TourTipDeleteForm::buildForm in Tour UI 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 ConfirmFormBase::buildForm

File

src/Form/TourTipDeleteForm.php, line 92

Class

TourTipDeleteForm
Builds the form to delete a tour tip.

Namespace

Drupal\tour_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $tour = '', $tip = '') {
  $this->entity = $this->entityTypeManager
    ->getStorage('tour')
    ->load($tour);
  $tour = $this->entity;
  $this->tip = $tour
    ->getTip($tip);
  return parent::buildForm($form, $form_state);
}