/**
  * Set default values for the form. For edit/view mode
  * the default values are retrieved from the database. It's called after
  * $this->preProcess().
  *
  * @access public
  *
  * @return array
  */
 function setDefaultValues()
 {
     $defaults = array();
     if ($this->_aid) {
         $commendations = CRM_Volunteer_BAO_Commendation::retrieve(array('id' => $this->_aid));
         $defaults['details'] = $commendations[$this->_aid]['details'];
     }
     return $defaults;
 }
/**
 * Returns array of commendations
 *
 * @param array $params  Associative array of property name/value pairs
 *                       describing the commendations to be retrieved.
 * @example
 * @return array ID-indexed array of matching commendations
 * {@getfields assignment_get}
 * @access public
 */
function civicrm_api3_volunteer_commendation_get($params)
{
    $result = CRM_Volunteer_BAO_Commendation::retrieve($params);
    return civicrm_api3_create_success($result, $params, 'Activity', 'get');
}