public function WebformMarkupBase::form in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/WebformMarkupBase.php \Drupal\webform\Plugin\WebformElement\WebformMarkupBase::form()
Gets the actual configuration webform 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 webform without any default values.
Overrides WebformElementBase::form
5 calls to WebformMarkupBase::form()
- ProcessedText::form in src/
Plugin/ WebformElement/ ProcessedText.php - Gets the actual configuration webform array to be built.
- View::form in src/
Plugin/ WebformElement/ View.php - Gets the actual configuration webform array to be built.
- WebformMarkup::form in src/
Plugin/ WebformElement/ WebformMarkup.php - Gets the actual configuration webform array to be built.
- WebformMessage::form in src/
Plugin/ WebformElement/ WebformMessage.php - Gets the actual configuration webform array to be built.
- WebformMore::form in src/
Plugin/ WebformElement/ WebformMore.php - Gets the actual configuration webform array to be built.
5 methods override WebformMarkupBase::form()
- ProcessedText::form in src/
Plugin/ WebformElement/ ProcessedText.php - Gets the actual configuration webform array to be built.
- View::form in src/
Plugin/ WebformElement/ View.php - Gets the actual configuration webform array to be built.
- WebformMarkup::form in src/
Plugin/ WebformElement/ WebformMarkup.php - Gets the actual configuration webform array to be built.
- WebformMessage::form in src/
Plugin/ WebformElement/ WebformMessage.php - Gets the actual configuration webform array to be built.
- WebformMore::form in src/
Plugin/ WebformElement/ WebformMore.php - Gets the actual configuration webform array to be built.
File
- src/
Plugin/ WebformElement/ WebformMarkupBase.php, line 142
Class
- WebformMarkupBase
- Provides a base 'markup' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
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' => $this
->getDisplayOnOptions(),
];
return $form;
}