예제 #1
0
 /**
  * Retrieve DB object based on input parameters.
  *
  * It also stores all the retrieved values in the default array.
  *
  * @param array $params
  *   (reference ) an assoc array of name/value pairs.
  * @param array $defaults
  *   (reference ) an assoc array to hold the flattened values.
  *
  * @return CRM_Contact_BAO_Group
  */
 public static function retrieve(&$params, &$defaults)
 {
     $group = new CRM_Contact_DAO_Group();
     $group->copyValues($params);
     if ($group->find(TRUE)) {
         CRM_Core_DAO::storeValues($group, $defaults);
         return $group;
     }
 }