public function TourTipForm::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 FormInterface::buildForm
File
- src/
Form/ TourTipForm.php, line 64
Class
- TourTipForm
- Form controller for the tour tip plugin edit forms.
Namespace
Drupal\tour_ui\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$storage = $form_state
->getStorage();
$tip = $storage['#tip'];
$form += $tip
->buildConfigurationForm($form, $form_state);
// Retrieve and add the form actions array.
$actions = $this
->actionsElement($form, $form_state);
if (!empty($actions)) {
$form['actions'] = $actions;
}
return $form;
}