Exemplo n.º 1
0
 /**
  * Takes a bunch of params that are needed to match certain criteria and
  * retrieves the relevant objects.  Typically, the valid params are only
  * price_field_id.  This is the inverse function of create.  It also
  * stores all of 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 object CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem object
  * @access public
  * @static
  */
 static function retrieve(&$params, &$defaults)
 {
     $lineItem = new CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem();
     $lineItem->copyValues($params);
     if ($lineItem->find(TRUE)) {
         CRM_Core_DAO::storeValues($lineItem, $defaults);
         return $lineItem;
     }
     return NULL;
 }