|
@@ 1089-1101 (lines=13) @@
|
| 1086 |
|
protected function _refresh_registration( $reg_cache_ID, $registration ) { |
| 1087 |
|
|
| 1088 |
|
// verify object |
| 1089 |
|
if ( $registration instanceof EE_Registration ) { |
| 1090 |
|
// update the entity mapper attendee |
| 1091 |
|
$this->_refresh_registration_attendee( $registration ); |
| 1092 |
|
// update the entity mapper answers for reg form questions |
| 1093 |
|
$this->_refresh_registration_answers( $registration ); |
| 1094 |
|
// make sure the cached registration is added to the model entity mapper |
| 1095 |
|
$registration->get_model()->refresh_entity_map_with( $reg_cache_ID, $registration ); |
| 1096 |
|
} else { |
| 1097 |
|
EE_Error::add_error( |
| 1098 |
|
__( 'An invalid Registration object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
| 1099 |
|
__FILE__, __FUNCTION__, __LINE__ |
| 1100 |
|
); |
| 1101 |
|
} |
| 1102 |
|
} |
| 1103 |
|
|
| 1104 |
|
|
|
@@ 1139-1149 (lines=11) @@
|
| 1136 |
|
// now update the answers |
| 1137 |
|
foreach ( $registration->answers() as $cache_key => $answer ) { |
| 1138 |
|
// verify object |
| 1139 |
|
if ( $answer instanceof EE_Answer ) { |
| 1140 |
|
if ( $answer->ID() ) { |
| 1141 |
|
// make sure the cached answer is added to the model entity mapper |
| 1142 |
|
$answer->get_model()->refresh_entity_map_with( $answer->ID(), $answer ); |
| 1143 |
|
} |
| 1144 |
|
} else { |
| 1145 |
|
EE_Error::add_error( |
| 1146 |
|
__( 'An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso' ), |
| 1147 |
|
__FILE__, __FUNCTION__, __LINE__ |
| 1148 |
|
); |
| 1149 |
|
} |
| 1150 |
|
} |
| 1151 |
|
} |
| 1152 |
|
|