upd: CommunityResource

* Add method to convert class to Location object
This commit is contained in:
Ryan Prather 2025-01-24 10:19:43 -05:00
parent df29fd0d99
commit 0d69b51ff9

View File

@ -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;
}
} }