public function WizardParameters::initFormEntityConfig in Flexiform 8
Initialise the enhancer config..
Return value
array The initial config for the enhancer.
File
- contrib/
wizard/ src/ Plugin/ FormEnhancer/ WizardParameters.php, line 34
Class
- WizardParameters
- Plugin for adding Wizard Parameters into the Flexiform entity manager.
Namespace
Drupal\flexiform_wizard\Plugin\FormEnhancerCode
public function initFormEntityConfig() {
list(, $wizard_id, $step) = explode('.', $this
->getFormDisplay()
->id(), 3);
$wizard = entity_load('flexiform_wizard', $wizard_id);
$form_entity_settings = [];
foreach ($wizard
->get('parameters') as $param_name => $param_info) {
$form_entity_settings[$param_name] = [
'entity_type' => $param_info['entity_type'],
'bundle' => $param_info['bundle'],
'plugin' => 'provided',
'label' => $param_info['label'],
];
}
return $form_entity_settings;
}