[core] add explicit support for list default value
and implicit support for text and number parameters Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
806f38b42d
commit
74d876b585
1 changed files with 12 additions and 0 deletions
|
@ -317,6 +317,18 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
case 'list':
|
||||
if(!isset($properties['defaultValue'])){
|
||||
$this->inputs[$context][$name]['value']=reset($properties['values']);
|
||||
}else{
|
||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(isset($properties['defaultValue'])){
|
||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue