Esempio n. 1
0
 /**
  * Takes a bunch of params that are needed to match certain criteria and
  * retrieves the relevant objects. 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 object CRM_Booking_DAO_Slot object on success, null otherwise
  * @access public
  * @static
  */
 static function retrieve(&$params, &$defaults)
 {
     $dao = new CRM_Booking_DAO_Slot();
     $dao->copyValues($params);
     if ($dao->find(TRUE)) {
         CRM_Core_DAO::storeValues($dao, $defaults);
         return $dao;
     }
     return NULL;
 }