This topic contains 2 replies, has 2 voices, and was last updated by seddonm1 9 years, 10 months ago.
- Topic
Hi,
I have returned to Oro after spending some time with the early betas and it is very much improved.I have found a scenario where I would like to be able to call a function similar to the javascript renderAddress version. I have seen you have this ‘todo’ action and was wondering if you have any improvements that are available?
Thanks,
Mike/**
* Convert address to string
* @todo: Address format must be used here
*
* @return string
*/
public function __toString()
{
$data = array(
$this->getFirstName(),
$this->getLastName(),
‘,’,
$this->getStreet(),
$this->getStreet2(),
$this->getCity(),
$this->getUniversalRegion(),
‘,’,
$this->getCountry(),
$this->getPostalCode(),
);$str = implode(‘ ‘, $data);
$check = trim(str_replace(‘,’, ”, $str));
return empty($check) ? ” : $str;
}
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.