@@ 204-212 (lines=9) @@ | ||
201 | * @param int $EVT_ID |
|
202 | * @return array |
|
203 | */ |
|
204 | public function get_all_event_question_groups( $EVT_ID = 0 ) { |
|
205 | if ( ! isset( $EVT_ID) || ! absint( $EVT_ID )) { |
|
206 | EE_Error::add_error( __( 'An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
207 | return FALSE; |
|
208 | } |
|
209 | return EE_Registry::instance()->load_model( 'Event_Question_Group' )->get_all( array( |
|
210 | array( 'EVT_ID' => $EVT_ID ) |
|
211 | )); |
|
212 | } |
|
213 | ||
214 | ||
215 | ||
@@ 226-234 (lines=9) @@ | ||
223 | * @param boolean $for_primary_attendee |
|
224 | * @return array |
|
225 | */ |
|
226 | public function get_event_question_groups( $EVT_ID = 0, $for_primary_attendee = TRUE ) { |
|
227 | if ( ! isset( $EVT_ID) || ! absint( $EVT_ID )) { |
|
228 | EE_Error::add_error( __( 'An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
229 | return FALSE; |
|
230 | } |
|
231 | return EE_Registry::instance()->load_model( 'Event_Question_Group' )->get_all( array( |
|
232 | array( 'EVT_ID' => $EVT_ID, 'EQG_primary' => $for_primary_attendee ) |
|
233 | )); |
|
234 | } |
|
235 | ||
236 | ||
237 |