WIP Pipework Workflow

This commit is contained in:
Frank Schubert
2021-08-29 16:56:46 +02:00
parent 0f42b2b942
commit b81081cfe6
22 changed files with 584 additions and 111 deletions

View File

@@ -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);