public function RedhenOrg::setPrimaryContact in RedHen CRM 7
Set the primary contact for an organization.
Parameters
RedhenContact $contact: The RedhenContact to use as the primary contact
Return value
bool Return FALSE if we are unable to set the primary contact
File
- modules/
redhen_org/ lib/ redhen_org.entity.inc, line 92 - Redhen Group entity classes
Class
- RedhenOrg
- The class used for group entities.
Code
public function setPrimaryContact(RedhenContact $contact) {
// @TODO Check that $contact has a relationship with $this.
$this->primary_contact_id = $contact->contact_id;
return $this
->save();
}