Started creating workflow

This commit is contained in:
Frank Schubert
2021-08-24 21:40:30 +02:00
parent 7ad852c4ef
commit 2e9d5d5767
22 changed files with 717 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ class Building extends mfBaseModel {
private $status;
private $pipeworker;
private $terminations;
private $workflowitems;
public function getAddress($singelLine = false) {
if(!$this->id) {
@@ -122,6 +123,14 @@ class Building extends mfBaseModel {
return $this->terminations;
}
if($name == "workflowitems") {
foreach(WorkflowitemModel::search(["object_type" => "building", "active" => 1]) as $item) {
$item->setObjectId($this->id);
$this->workflowitems[] = $item;
}
return $this->workflowitems;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = new $classname($this->$idfield);