Ejemplo n.º 1
0
 /**
  * Takes an associative array and creates a tell a friend object.
  *
  * the function extract all the params it needs to initialize the create/edit a
  * friend object. the params array could contain additional unused name/value
  * pairs
  *
  * @param array $params
  *   (reference ) an assoc array of name/value pairs.
  *
  * @return CRM_Friend_BAO_Friend
  */
 public static function addTellAFriend(&$params)
 {
     $friendDAO = new CRM_Friend_DAO_Friend();
     $friendDAO->copyValues($params);
     $friendDAO->is_active = CRM_Utils_Array::value('is_active', $params, FALSE);
     $friendDAO->save();
     return $friendDAO;
 }