Legacy event data if get_legacy_eventname() is not empty.

@return \stdClass
353739
protected function get_legacy_eventdata() {
        $eventdata = new \stdClass();
        $eventdata->groupid = $this->objectid;
        $eventdata->userid  = $this->relateduserid;
        $eventdata->component = $this->other['component'];
        $eventdata->itemid = $this->other['itemid'];
        return $eventdata;
    }
675281
public function extractRecordedEvents()
    {
        $eventCollection = $this->eventCollection();
        $eventStream = $eventCollection->stream();
        $eventCollection->commit();
        $this->committedVersion = $eventCollection->committedSequence();

        return $eventStream;
    }
215177
protected static function getEventLoopName()
    {
        if (self::$eventLoopClass) {
            return self::$eventLoopClass;
        }
        self::$eventLoopClass = self::$_availableEventLoops['Swoole'];
        return self::$eventLoopClass;
    }
690948
protected function get_legacy_logdata() {
        $url = 'report/completion/user.php?id=' . $this->relateduserid . '&course=' . $this->courseid;
        return array($this->courseid, 'course', 'report completion', $url, $this->courseid);
    }
57523
protected function get_legacy_eventdata() {
        $user = $this->get_record_snapshot('user', $this->objectid);
        $user->deleted = 0;
        $user->username = $this->other['username'];
        $user->email = $this->other['email'];
        $user->idnumber = $this->other['idnumber'];
        $user->picture = $this->other['picture'];

        return $user;
    }
1329666
public static final function get_static_info() {
        /** Var \core\event\base $event. */
        $event = new static();
        // Set static event data specific for child class.
        $event->init();
        return array(
            'eventname' => $event->data['eventname'],
            'component' => $event->data['component'],
            'target' => $event->data['target'],
            'action' => $event->data['action'],
            'crud' => $event->data['crud'],
            'edulevel' => $event->data['edulevel'],
            'objecttable' => $event->data['objecttable'],
        );
    }
851060
protected function get_legacy_logdata() {
        $log1 = array($this->courseid, "course", "update mod", "../mod/" . $this->other['modulename'] . "/view.php?id=" .
                $this->objectid, $this->other['modulename'] . " " . $this->other['instanceid']);
        $log2 = array($this->courseid, $this->other['modulename'], "update",
               "view.php?id={$this->objectid}",
               "{$this->other['instanceid']}", $this->objectid);
        return array($log1, $log2);
    }
749666
protected function get_legacy_logdata() {
        // The legacy log table expects a relative path to /mod/forum/.
        $logurl = substr($this->get_url()->out_as_local_url(), strlen('/mod/forum/'));

        return array($this->courseid, 'forum', 'search', $logurl, $this->other['searchterm']);
    }
732652
public function get_legacy_logdata() {
        return array($this->courseid, 'data', 'update', 'view.php?d=' . $this->other['dataid'] . '&amp;rid=' . $this->objectid,
            $this->other['dataid'], $this->contextinstanceid);
    }
60568
private function _getCurrentData()
    {
        $cls = $this->_cls;
        if (!$this->_data) {
            $this->_data = $cls::executePrepared($this->_builder, $this->_vals);
        }
        return $this->_data->fetch(\PDO::FETCH_ASSOC);
    }
237101
protected function get_legacy_logdata() {
        return array($this->courseid, 'scorm', 'userreportinteractions', 'report/userreportinteractions.php?id=' .
                $this->contextinstanceid . '&user=' . $this->relateduserid . '&attempt=' . $this->other['attemptid'],
                $this->other['instanceid'], $this->contextinstanceid);
    }
541266
protected function get_legacy_logdata() {
        $url = new \moodle_url('report.php', array('id' => $this->contextinstanceid));
        return array($this->courseid, 'choice', 'report', $url->out(), $this->objectid, $this->contextinstanceid);
    }
576382
protected function get_legacy_eventdata() {
        $course = $this->get_record_snapshot('course', $this->objectid);
        $course->context = $this->context;
        $course->timemodified = $this->data['timecreated'];
        return $course;
    }
270721
protected function getEvent()
    {
        if (null === $this->event) {
            $this->event = $event = new EntityEvent;

            $event->setTarget($this);
        }

        return $this->event;
    }
91819
public function prevEvent()
    {
        $prev = $this->eventManager()->prev();

        if (!$prev) {
            return null;
        }

        return $this->eventFormatNav($prev);
    }
1239722
protected function get_legacy_eventdata() {
        $attempt = $this->get_record_snapshot('quiz_attempts', $this->objectid);

        $legacyeventdata = new \stdClass();
        $legacyeventdata->component = 'mod_quiz';
        $legacyeventdata->attemptid = $this->objectid;
        $legacyeventdata->timestamp = $attempt->timemodified;
        $legacyeventdata->userid = $this->relateduserid;
        $legacyeventdata->quizid = $attempt->quiz;
        $legacyeventdata->cmid = $this->contextinstanceid;
        $legacyeventdata->courseid = $this->courseid;
        $legacyeventdata->submitterid = $this->other['submitterid'];

        return $legacyeventdata;
    }
38710
protected function get_legacy_logdata() {
        $roles = get_all_roles();
        $rolenames = role_fix_names($roles, $this->get_context(), ROLENAME_ORIGINAL, true);
        return array($this->courseid, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$this->contextid.'&roleid='.$this->objectid,
                $rolenames[$this->objectid], '', $this->userid);
    }