/** * Get a list of Projects matching the params, where params keys are column * names of civicrm_volunteer_project. * * @param array $params * @return array of CRM_Volunteer_BAO_Project objects */ static function retrieve(array $params) { $result = array(); $project = new CRM_Volunteer_BAO_Project(); $project->copyValues($params); $project->find(); while ($project->fetch()) { $result[(int) $project->id] = clone $project; } $project->free(); return $result; }