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