public function MultiStepFormBase::buildForm in Activity 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
2 calls to MultiStepFormBase::buildForm()
- ConfigureActivityForm::buildForm in src/
Form/ ConfigureActivityForm.php - Form constructor.
- CreateActivityForm::buildForm in src/
Form/ CreateActivityForm.php - Form constructor.
2 methods override MultiStepFormBase::buildForm()
- ConfigureActivityForm::buildForm in src/
Form/ ConfigureActivityForm.php - Form constructor.
- CreateActivityForm::buildForm in src/
Form/ CreateActivityForm.php - Form constructor.
File
- src/
Form/ MultiStepFormBase.php, line 78
Class
- MultiStepFormBase
- Multi step form.
Namespace
Drupal\activity\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
// Start a manual session for anonymous users.
if ($this->currentUser
->isAnonymous() && !isset($_SESSION['multistep_form_holds_session'])) {
$_SESSION['multistep_form_holds_session'] = TRUE;
$this->sessionManager
->start();
}
return $form;
}