Added municipality for district_is_city campaigns
This commit is contained in:
@@ -6,6 +6,7 @@ class ADBHausnummer extends mfBaseModel {
|
||||
private $strasse;
|
||||
private $plz;
|
||||
private $freigaben = [];
|
||||
private $wohneinheiten = [];
|
||||
|
||||
protected function init() {
|
||||
$this->db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
@@ -105,6 +106,17 @@ class ADBHausnummer extends mfBaseModel {
|
||||
}
|
||||
return $this->plz;
|
||||
}
|
||||
|
||||
if($name == "wohneinheiten") {
|
||||
$this->wohneinheiten = mfValuecache::singleton()->get("adbWohneinheiten-hausnummer-".$this->id);
|
||||
if($this->wohneinheiten === null) {
|
||||
$this->wohneinheiten = ADBWohneinheitModel::search(['hausnummer_id' => $this->id]);
|
||||
if($this->wohneinheiten) {
|
||||
mfValuecache::singleton()->set("adbWohneinheiten-hausnummer-".$this->id, $this->wohneinheiten);
|
||||
}
|
||||
}
|
||||
return $this->wohneinheiten;
|
||||
}
|
||||
|
||||
$classname = ucfirst($name);
|
||||
$idfield = $name."_id";
|
||||
|
||||
Reference in New Issue
Block a user