public function modify(array $structure)
{
if (TRUE === isset($structure['wizards'])) {
foreach ((array) $structure['wizards'] as $index => $wizardData) {
$wizardName = TRUE === isset($wizardData['name']) ? $wizardData['name'] : $index;
// check if field already exists - if it does, modify it. If it does not, create it.
if (TRUE === $this->has($wizardName)) {
$field = $this->get($wizardName);
} else {
$wizardType = TRUE === isset($wizardData['type']) ? $wizardData['type'] : 'None';
$field = $this->createWizard($wizardType, $wizardName);
}
$field->modify($wizardData);
}
}
return parent::modify($structure);
}