File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,16 @@ protected function getOutputDimensions():array{
94
94
*/
95
95
protected function setModuleValues ():void {
96
96
97
+ // first fill the map with the default values
97
98
foreach ($ this ::DEFAULT_MODULE_VALUES as $ M_TYPE => $ defaultValue ){
98
- $ value = ($ this ->options ->moduleValues [$ M_TYPE ] ?? null );
99
+ $ this ->moduleValues [$ M_TYPE ] = $ this ->getDefaultModuleValue ($ defaultValue );
100
+ }
99
101
100
- $ this ->moduleValues [$ M_TYPE ] = $ this ::moduleValueIsValid ($ value )
101
- ? $ this ->prepareModuleValue ($ value )
102
- : $ this ->getDefaultModuleValue ($ defaultValue );
102
+ // now loop over the options values to replace defaults and add extra values
103
+ foreach ($ this ->options ->moduleValues as $ M_TYPE => $ value ){
104
+ if ($ this ::moduleValueIsValid ($ value )){
105
+ $ this ->moduleValues [$ M_TYPE ] = $ this ->prepareModuleValue ($ value );
106
+ }
103
107
}
104
108
105
109
}
You can’t perform that action at this time.
0 commit comments