Hausnummer Freigabe now json array
This commit is contained in:
@@ -3,17 +3,13 @@
|
||||
class ADBHausnummer extends mfBaseModel {
|
||||
private $strasse;
|
||||
private $plz;
|
||||
private $freigabe = [];
|
||||
private $freigaben = [];
|
||||
|
||||
protected function init() {
|
||||
$this->db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
$this->table = "Hausnummer";
|
||||
}
|
||||
|
||||
public function afterLoad() {
|
||||
//$this->strasse = new ADBStrasse($this->strasse_id);
|
||||
//$this->plz = new ADBPlz($this->plz_id);
|
||||
}
|
||||
/*
|
||||
public static function parseAddresszusatz($text) {
|
||||
$zusatz = "";
|
||||
@@ -43,11 +39,9 @@ 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 == "freigaben") {
|
||||
$this->freigaben = explode(",", $this->freigabe);
|
||||
return $this->freigaben;
|
||||
}
|
||||
|
||||
if($name == "strasse") {
|
||||
|
||||
Reference in New Issue
Block a user