public function YamlFormHandlerAddForm::buildForm in YAML Form 8
Parameters
\Drupal\yamlform\YamlFormInterface $yamlform: The form.
string $yamlform_handler: The form handler ID.
Return value
array The form structure.
Throws
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException Throws not found exception if the number of handler instances for this form exceeds the handler's cardinality.
Overrides YamlFormHandlerFormBase::buildForm
File
- src/
Form/ YamlFormHandlerAddForm.php, line 44
Class
- YamlFormHandlerAddForm
- Provides an add form for form handler.
Namespace
Drupal\yamlform\FormCode
public function buildForm(array $form, FormStateInterface $form_state, YamlFormInterface $yamlform = NULL, $yamlform_handler = NULL) {
$form = parent::buildForm($form, $form_state, $yamlform, $yamlform_handler);
$form['#title'] = $this
->t('Add @label handler', [
'@label' => $this->yamlformHandler
->label(),
]);
return $form;
}