public function Radios::buildSelectorForm in Plugin 8.2
Builds the selector form.
Parameters
mixed[] $form: Any suggested form elements to build upon. May be ignored.
\Drupal\Core\Form\FormStateInterface $form_state: The form state for $form and the return value. This often is not the complete (global) form state.
Return value
mixed[] The form structure.
Throws
\RuntimeException Thrown if the plugin type was not set using self::setSelectablePluginType().
Overrides AdvancedPluginSelectorBase::buildSelectorForm
File
- src/
Plugin/ Plugin/ PluginSelector/ Radios.php, line 21
Class
- Radios
- Provides a plugin selector using a radio buttons.
Namespace
Drupal\plugin\Plugin\Plugin\PluginSelectorCode
public function buildSelectorForm(array $form, FormStateInterface $form_state) {
$form = parent::buildSelectorForm($form, $form_state);
$form['clear'] = [
'#markup' => '<div style="clear: both;"></div>',
];
return $form;
}