/** * Returns the data needed for the account list-sidebar. * * @param ContactInterface $contact * * @return array */ protected function parseMainContact(ContactInterface $contact) { if ($contact) { $data = []; $data['id'] = $contact->getId(); $data['fullName'] = $contact->getFullName(); $data['phone'] = $contact->getMainPhone(); $data['email'] = $contact->getMainEmail(); return $data; } else { return null; } }