public function YamlFormMarkupBase::form in YAML Form 8
Gets the actual configuration form array to be built.
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 An associative array contain the element's configuration form without any default values..
Overrides YamlFormElementBase::form
3 calls to YamlFormMarkupBase::form()
- ProcessedText::form in src/
Plugin/ YamlFormElement/ ProcessedText.php - Gets the actual configuration form array to be built.
- YamlFormMarkup::form in src/
Plugin/ YamlFormElement/ YamlFormMarkup.php - Gets the actual configuration form array to be built.
- YamlFormMessage::form in src/
Plugin/ YamlFormElement/ YamlFormMessage.php - Gets the actual configuration form array to be built.
3 methods override YamlFormMarkupBase::form()
- ProcessedText::form in src/
Plugin/ YamlFormElement/ ProcessedText.php - Gets the actual configuration form array to be built.
- YamlFormMarkup::form in src/
Plugin/ YamlFormElement/ YamlFormMarkup.php - Gets the actual configuration form array to be built.
- YamlFormMessage::form in src/
Plugin/ YamlFormElement/ YamlFormMessage.php - Gets the actual configuration form array to be built.
File
- src/
Plugin/ YamlFormElement/ YamlFormMarkupBase.php, line 108
Class
- YamlFormMarkupBase
- Provides a base 'markup' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$form['markup'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Markup settings'),
];
$form['markup']['display_on'] = [
'#type' => 'select',
'#title' => $this
->t('Display on'),
'#options' => [
'form' => t('form only'),
'display' => t('viewed submission only'),
'both' => t('both form and viewed submission'),
],
];
return $form;
}