Added Linework workflow
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user