@@ 250-267 (lines=18) @@ | ||
247 | * @return array|bool |
|
248 | * @throws \EE_Error |
|
249 | */ |
|
250 | public function get_all_event_question_groups($EVT_ID = 0) |
|
251 | { |
|
252 | if (! isset($EVT_ID) || ! absint($EVT_ID)) { |
|
253 | EE_Error::add_error( |
|
254 | esc_html__( |
|
255 | 'An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.', |
|
256 | 'event_espresso' |
|
257 | ), |
|
258 | __FILE__, __FUNCTION__, __LINE__ |
|
259 | ); |
|
260 | return false; |
|
261 | } |
|
262 | return EE_Registry::instance()->load_model('Event_Question_Group')->get_all( |
|
263 | array( |
|
264 | array('EVT_ID' => $EVT_ID), |
|
265 | ) |
|
266 | ); |
|
267 | } |
|
268 | ||
269 | ||
270 | ||
@@ 279-299 (lines=21) @@ | ||
276 | * @return array|bool |
|
277 | * @throws \EE_Error |
|
278 | */ |
|
279 | public function get_event_question_groups($EVT_ID = 0, $for_primary_attendee = true) |
|
280 | { |
|
281 | if (! isset($EVT_ID) || ! absint($EVT_ID)) { |
|
282 | EE_Error::add_error( |
|
283 | esc_html__( |
|
284 | 'An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.', |
|
285 | 'event_espresso' |
|
286 | ), |
|
287 | __FILE__, __FUNCTION__, __LINE__ |
|
288 | ); |
|
289 | return false; |
|
290 | } |
|
291 | return EE_Registry::instance()->load_model('Event_Question_Group')->get_all( |
|
292 | array( |
|
293 | array( |
|
294 | 'EVT_ID' => $EVT_ID, |
|
295 | 'EQG_primary' => $for_primary_attendee, |
|
296 | ), |
|
297 | ) |
|
298 | ); |
|
299 | } |
|
300 | ||
301 | ||
302 |