WIP Pipework Workflow
This commit is contained in:
@@ -10,6 +10,7 @@ class Building extends mfBaseModel {
|
||||
private $pipeworker;
|
||||
private $terminations;
|
||||
private $workflowitems;
|
||||
private $files;
|
||||
|
||||
public function getAddress($singelLine = false) {
|
||||
if(!$this->id) {
|
||||
@@ -126,11 +127,17 @@ class Building extends mfBaseModel {
|
||||
if($name == "workflowitems") {
|
||||
foreach(WorkflowitemModel::search(["object_type" => "building", "active" => 1]) as $item) {
|
||||
$item->setObjectId($this->id);
|
||||
$this->workflowitems[] = $item;
|
||||
$this->workflowitems[$item->name] = $item;
|
||||
}
|
||||
//var_dump($this->workflowitems);exit;
|
||||
return $this->workflowitems;
|
||||
}
|
||||
|
||||
if($name == "files") {
|
||||
$this->files = BuildingFileModel::search(["building_id" => $this->id]);
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
$classname = ucfirst($name);
|
||||
$idfield = $name."_id";
|
||||
$this->$name = new $classname($this->$idfield);
|
||||
|
||||
Reference in New Issue
Block a user