forked from Wavyzz/dolibarr
Enhance modulebuilder
This commit is contained in:
@@ -128,17 +128,19 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
||||
$i++;
|
||||
$texttoinsert.= "\t\t'".$key."' => array('type'=>'".$val['type']."', 'label'=>'".$val['label']."',";
|
||||
$texttoinsert.= " 'enabled'=>".($val['enabled']!=''?$val['enabled']:1).",";
|
||||
$texttoinsert.= " 'visible'=>".($val['visible']!=''?$val['visible']:-1).",";
|
||||
$texttoinsert.= " 'position'=>".($val['position']!=''?$val['position']:50).",";
|
||||
$texttoinsert.= " 'notnull'=>".($val['notnull']!=''?$val['notnull']:-1).",";
|
||||
$texttoinsert.= " 'notnull'=>".(empty($val['notnull'])?0:$val['notnull']).",";
|
||||
$texttoinsert.= " 'visible'=>".($val['visible']!=''?$val['visible']:-1).",";
|
||||
if ($val['noteditable']) $texttoinsert.= " 'noteditable'=>'".$val['noteditable']."',";
|
||||
if ($val['default']) $texttoinsert.= " 'default'=>'".$val['default']."',";
|
||||
if ($val['index']) $texttoinsert.= " 'index'=>".$val['index'].",";
|
||||
if ($val['foreignkey']) $texttoinsert.= " 'foreignkey'=>'".$val['foreignkey']."',";
|
||||
if ($val['searchall']) $texttoinsert.= " 'searchall'=>".$val['searchall'].",";
|
||||
if ($val['isameasure']) $texttoinsert.= " 'isameasure'=>'".$val['isameasure']."',";
|
||||
if ($val['foreignkey']) $texttoinsert.= " 'foreignkey'=>'".$val['foreignkey']."',";
|
||||
if ($val['css']) $texttoinsert.= " 'css'=>'".$val['css']."',";
|
||||
if ($val['help']) $texttoinsert.= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\",";
|
||||
if ($val['comment']) $texttoinsert.= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\",";
|
||||
if ($val['showoncombobox']) $texttoinsert.= " 'showoncombobox'=>'".$val['showoncombobox']."',";
|
||||
if ($val['disabled']) $texttoinsert.= " 'disabled'=>'".$val['disabled']."',";
|
||||
if ($val['arrayofkeyval'])
|
||||
{
|
||||
$texttoinsert.= " 'arrayofkeyval'=>array(";
|
||||
@@ -149,8 +151,10 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
||||
$texttoinsert.="'".$key2."'=>'".$val2."'";
|
||||
$i++;
|
||||
}
|
||||
$texttoinsert.= ")";
|
||||
$texttoinsert.= "),";
|
||||
}
|
||||
if ($val['comment']) $texttoinsert.= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\"";
|
||||
|
||||
$texttoinsert.= "),\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user