changes linework to openable list
This commit is contained in:
@@ -79,9 +79,46 @@ class Building extends mfBaseModel {
|
||||
return $code;
|
||||
}
|
||||
|
||||
public function getWorkflowvalue($itemname, $type = "string") {
|
||||
public function getWorkflowvalue($itemname, $type = false) {
|
||||
$item = WorkflowitemModel::getFirst(['name' => $itemname]);
|
||||
if(!$item->id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch($item->type) {
|
||||
case "string":
|
||||
$value_type = "string";
|
||||
break;
|
||||
case "enum":
|
||||
$value_type = "string";
|
||||
break;
|
||||
case "gps":
|
||||
$value_type = "string";
|
||||
break;
|
||||
case "color":
|
||||
$value_type = "string";
|
||||
break;
|
||||
case "date":
|
||||
$value_type = "string";
|
||||
break;
|
||||
case "int":
|
||||
$value_type = "int";
|
||||
break;
|
||||
case "bool":
|
||||
$value_type = "int";
|
||||
break;
|
||||
case "file":
|
||||
$value_type = "int";
|
||||
break;
|
||||
case "text":
|
||||
$value_type = "text";
|
||||
break;
|
||||
default:
|
||||
$value_type = "string";
|
||||
}
|
||||
|
||||
if(array_key_exists($itemname, $this->getProperty("workflowitems"))) {
|
||||
return $this->getProperty("workflowitems")[$itemname]->value->{"value_$type"};
|
||||
return $this->getProperty("workflowitems")[$itemname]->value->{"value_$value_type"};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user