You are here

public function CustomTipsDeleteForm::buildForm in BeautyTips 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

beautytips_manager/src/Form/CustomTipsDeleteForm.php, line 38

Class

CustomTipsDeleteForm

Namespace

Drupal\beautytips_manager\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $id = NULL) {
  $this->tip = beautytips_manager_get_custom_tip($id);
  if (empty($this->tip)) {
    throw new NotFoundHttpException();
  }
  return parent::buildForm($form, $form_state);
}