Programming Language PHP

Namespace Oro\Bundle\ContactBundle\Entity

Class Contact

Method/Function getPhones

Total Examples 1

1 code examples of PHP Oro\Bundle\ContactBundle\Entity\Contact::getPhones extracted from open source projects

Was this example useful?
0
                                                    /**
     * Gets a list of all phone numbers available for the given Contact object
     *
     *
     * @return array of [phone number, phone owner]
     */
    public function getPhoneNumbers(Contact $object): array
    {
        $result = [];

        foreach ($object->getPhones() as $phone) {
            $result[] = [$phone->getPhone(), $object];
        }

        return $result;
    }