protected function resolve_core_requirements(\core\plugininfo\base $plugin, $moodleversion) {

        $reqs = (object)array(
            'hasver' => null,
            'reqver' => null,
            'status' => null,
            'availability' => null,
        );

        $reqs->hasver = $moodleversion;

        if (empty($plugin->versionrequires)) {
            $reqs->reqver = ANY_VERSION;
        } else {
            $reqs->reqver = $plugin->versionrequires;
        }

        if ($plugin->is_core_dependency_satisfied($moodleversion)) {
            $reqs->status = self::REQUIREMENT_STATUS_OK;
        } else {
            $reqs->status = self::REQUIREMENT_STATUS_OUTDATED;
        }

        return $reqs;
    }
protected function resolve_core_requirements(\core\plugininfo\base $plugin, $moodleversion) {

        $reqs = (object)array(
            'hasver' => null,
            'reqver' => null,
            'status' => null,
            'availability' => null,
        );

        $reqs->hasver = $moodleversion;

        if (empty($plugin->versionrequires)) {
            $reqs->reqver = ANY_VERSION;
        } else {
            $reqs->reqver = $plugin->versionrequires;
        }

        if ($plugin->is_core_dependency_satisfied($moodleversion)) {
            $reqs->status = self::REQUIREMENT_STATUS_OK;
        } else {
            $reqs->status = self::REQUIREMENT_STATUS_OUTDATED;
        }

        return $reqs;
    }
protected function resolve_core_requirements ( \ core \ plugininfo \ base $ plugin , $ moodleversion ) { $ reqs = ( object ) array ( 'hasver' => null , 'reqver' => null , 'status' => null , 'availability' => null , ) ; $ reqs -> hasver = $ moodleversion ; if ( empty ( $ plugin -> versionrequires ) ) { $ reqs -> reqver = ANY_VERSION ; } else { $ reqs -> reqver = $ plugin -> versionrequires ; } if ( $ plugin -> is_core_dependency_satisfied ( $ moodleversion ) ) { $ reqs -> status = self :: REQUIREMENT_STATUS_OK ; } else { $ reqs -> status = self :: REQUIREMENT_STATUS_OUTDATED ; } return $ reqs ; }
Helper method to resolve plugin's requirements on the moodle core.

@param \core\plugininfo\base $plugin the plugin we are checking
@param string|int|double $moodleversion moodle core branch to check against
@return stdObject
Helper method to resolve plugin s requirements on the moodle core .