Added Linework workflow

This commit is contained in:
Frank Schubert
2021-09-09 22:09:07 +02:00
parent af23c18dc6
commit e5acbdba40
22 changed files with 969 additions and 36 deletions
+25 -1
View File
@@ -6,6 +6,8 @@ class Termination extends mfBaseModel {
private $building;
private $status;
private $lineworker;
private $workflowitems;
private $files;
private $creator;
private $editor;
@@ -70,7 +72,15 @@ class Termination extends mfBaseModel {
return $code;
}
public function resetProperties() {
$this->building = null;
$this->status = null;
$this->lineworder = null;
$this->workflowitems = null;
$this->files = null;
$this->creator = null;
$this->editor = null;
}
public function getProperty($name) {
if($this->$name == null) {
@@ -80,6 +90,20 @@ class Termination extends mfBaseModel {
return $this->status;
}
if($name == "workflowitems") {
foreach(WorkflowitemModel::search(["object_type" => "Termination", "active" => 1]) as $item) {
$item->setObjectId($this->id);
$this->workflowitems[$item->name] = $item;
}
//var_dump($this->workflowitems);exit;
return $this->workflowitems;
}
if($name == "files") {
$this->files = TerminationFileModel::search(["termination_id" => $this->id]);
return $this->files;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = new $classname($this->$idfield);