protected function PdbBlock::buildComponentSettingsForm in Decoupled Blocks 8
Build settings component settings form.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state array.
1 call to PdbBlock::buildComponentSettingsForm()
- PdbBlock::buildConfigurationForm in src/
Plugin/ Block/ PdbBlock.php - Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements.
File
- src/
Plugin/ Block/ PdbBlock.php, line 278
Class
- PdbBlock
- Class PdbBlock.
Namespace
Drupal\pdb\Plugin\BlockCode
protected function buildComponentSettingsForm(FormStateInterface $form_state) {
$definition = $this
->getPluginDefinition();
$elements = [];
if (isset($definition['info']['configuration'])) {
$elements = $this
->createElementsFromConfiguration($definition['info']['configuration'], $form_state);
$elements['#title'] = $this
->t('Component Settings');
$elements['#type'] = 'details';
$elements['#open'] = TRUE;
$elements['#tree'] = TRUE;
}
return $elements;
}