protected function AdvancedPluginSelectorBase::buildPluginForm in Plugin 8.2
Builds the plugin configuration form elements.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
array
2 calls to AdvancedPluginSelectorBase::buildPluginForm()
- AdvancedPluginSelectorBase::buildMultipleAvailablePlugins in src/
Plugin/ Plugin/ PluginSelector/ AdvancedPluginSelectorBase.php - Builds the form elements for multiple plugins.
- AdvancedPluginSelectorBase::buildOneAvailablePlugin in src/
Plugin/ Plugin/ PluginSelector/ AdvancedPluginSelectorBase.php - Builds the form elements for one plugin.
File
- src/
Plugin/ Plugin/ PluginSelector/ AdvancedPluginSelectorBase.php, line 212
Class
- AdvancedPluginSelectorBase
- Provides a default base for most plugin selectors.
Namespace
Drupal\plugin\Plugin\Plugin\PluginSelectorCode
protected function buildPluginForm(FormStateInterface $form_state) {
$element = [
'#attributes' => [
'class' => [
Html::getClass(sprintf('plugin-selector-%s-plugin-form', $this
->getPluginId())),
],
],
'#type' => 'container',
];
$selectedPlugin = $this
->getSelectedPlugin();
if ($this
->getCollectPluginConfiguration() && $selectedPlugin instanceof PluginFormInterface) {
$element += $selectedPlugin
->buildConfigurationForm([], $form_state);
}
return $element;
}