Added addresstypes to address

This commit is contained in:
Frank Schubert
2021-06-17 20:39:22 +02:00
parent ed484f6fde
commit 0033247996
6 changed files with 220 additions and 9 deletions

View File

@@ -214,10 +214,27 @@ class mfBaseModel {
}
public function __get($name) {
if($name == "create" || $name == "edit") {
if(isset($this->data->$name)) {
return $this->data->$name;
} else {
return $this->$name;
}
}
if(isset($this->data->$name)) {
return $this->data->$name;
} elseif(property_exists(__CLASS__, $name)) {
return $this->$name;
} elseif(property_exists($this, $name)) {
if(method_exists($this, "getProperty")) {
$prop = $this->getProperty($name);
if($prop === null){
return null;
}
return $prop;
} else {
return $this->$name;
}
}
return null;
}