Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created January 11, 2016 18:20
Show Gist options
  • Save Pebblo/ce01a02c0864f2c57685 to your computer and use it in GitHub Desktop.
Save Pebblo/ce01a02c0864f2c57685 to your computer and use it in GitHub Desktop.
This example shows how to identify the different system groups provided from EE_event->question_groups()
<?php
/** @type EE_Event $event */
$event = EEM_Event::instance()->get_one_by_ID( 1 );
$question_groups = $event->question_groups();
foreach ( $question_groups as $question_group ) {
if ( $question_group instanceof EE_Question_Group ) {
switch( $question_group->system_group() ) {
case EEM_Question_Group::system_personal :
// personal question group
break;
case EEM_Question_Group::system_address :
// address question group
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment