Added forms for Contractconfig
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
class Productgroup extends mfBaseModel {
|
||||
private $products;
|
||||
private $contractconfiggroups;
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
@@ -21,6 +22,20 @@ class Productgroup extends mfBaseModel {
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
if($name == "contractconfiggroups") {
|
||||
$this->contractconfiggroups = mfValuecache::singleton()->get("Contractconfiggroups-byProductgroupid-".$this->id);
|
||||
if($this->contractconfiggroups === null) {
|
||||
$this->contractconfiggroups = [];
|
||||
foreach(ContractconfiggroupProductgroupModel::search(['productgroup_id' => $this->id]) as $ccpg) {
|
||||
$this->contractconfiggroups[$ccpg->contractconfiggroup_id] = $ccpg->contractconfiggroup;
|
||||
}
|
||||
if(count($this->contractconfiggroups)) {
|
||||
mfValuecache::singleton()->set("Contractconfiggroups-byProductgroupid-".$this->id, $this->contractconfiggroups);
|
||||
}
|
||||
}
|
||||
return $this->contractconfiggroups;
|
||||
}
|
||||
|
||||
if($name == "creator") {
|
||||
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
|
||||
if($this->creator === null) {
|
||||
|
||||
Reference in New Issue
Block a user