$contact = CRM_Contact_BAO_Contact::retrieve($contactID); $fullName = $contact->displayName();
$params = array('noLastNameFormat' => TRUE, 'firstOnly' => FALSE); $contact = CRM_Contact_BAO_Contact::retrieve($contactID); $fullName = $contact->displayName(TRUE, $params);In the first example, we retrieve the contact object using its ID and then call the displayName method to get the full name. In the second example, we pass additional parameters to the displayName method to customize the format of the full name. Overall, CRM_Contact_BAO_Contact is a useful class for managing contact information in a CRM system.