Hausnummer Frigabe is own table now
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
class ADBHausnummer extends mfBaseModel {
|
||||
private $strasse;
|
||||
private $plz;
|
||||
private $freigabe = [];
|
||||
|
||||
protected function init() {
|
||||
$this->db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
@@ -42,6 +43,13 @@ class ADBHausnummer extends mfBaseModel {
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
if($name == "freigabe") {
|
||||
foreach(ADBHausnummerFreigabeModel::search(['hausnummer_id' => $this->id]) as $hf) {
|
||||
$this->freigabe[] = $hf->freigabe;
|
||||
}
|
||||
return $this->freigabe;
|
||||
}
|
||||
|
||||
if($name == "strasse") {
|
||||
$this->strasse = new ADBStrasse($this->strasse_id);
|
||||
return $this->strasse;
|
||||
|
||||
Reference in New Issue
Block a user