public function get_group(event_interface $event) {
        if (is_null($this->groups)) {
            $this->load_groups();
        }

        if ($group = $event->get_group()) {
            $groupid = $group->get('id');
            return isset($this->groups[$groupid]) ? $this->groups[$groupid] : null;
        } else {
            return null;
        }
    }
public function get_group(event_interface $event) {
        if (is_null($this->groups)) {
            $this->load_groups();
        }

        if ($group = $event->get_group()) {
            $groupid = $group->get('id');
            return isset($this->groups[$groupid]) ? $this->groups[$groupid] : null;
        } else {
            return null;
        }
    }
public function get_group ( event_interface $ event ) { if ( is_null ( $ this -> groups ) ) { $ this -> load_groups ( ) ; } if ( $ group = $ event -> get_group ( ) ) { $ groupid = $ group -> get ( 'id' ) ; return isset ( $ this -> groups [ $ groupid ] ) ? $ this -> groups [ $ groupid ] : null ; } else { return null ; } }
Get the related group object for a given event.

@param event_interface $event The event object.
@return stdClass|null
Get the related group object for a given event .