upd: CommunityResource
* Add method to convert class to Location object
This commit is contained in:
parent
df29fd0d99
commit
0d69b51ff9
@ -683,4 +683,19 @@ class CommunityResource
|
|||||||
{$this->getContactCard()}
|
{$this->getContactCard()}
|
||||||
EOL;
|
EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toLocation(): Location
|
||||||
|
{
|
||||||
|
$loc = new Location();
|
||||||
|
$loc->setName($this->name)
|
||||||
|
->setAddress($this->address)
|
||||||
|
->setCity($this->city)
|
||||||
|
->setState($this->state)
|
||||||
|
->setZip($this->zip)
|
||||||
|
->setLat($this->lat)
|
||||||
|
->setLon($this->lon)
|
||||||
|
;
|
||||||
|
|
||||||
|
return $loc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user