public static function get_context_data(\context $context, \stdClass $user) : \stdClass {
        global $DB;

        $basedata = (object) [];
        if ($context instanceof \context_module) {
            return static::get_context_module_data($context, $user);
        }
        if ($context instanceof \context_block) {
            return static::get_context_block_data($context, $user);
        }

        return $basedata;
    }
public static function get_context_data(\context $context, \stdClass $user) : \stdClass {
        global $DB;

        $basedata = (object) [];
        if ($context instanceof \context_module) {
            return static::get_context_module_data($context, $user);
        }
        if ($context instanceof \context_block) {
            return static::get_context_block_data($context, $user);
        }

        return $basedata;
    }
public static function get_context_data ( \ context $ context , \ stdClass $ user ) : \ stdClass { global $ DB ; $ basedata = ( object ) [ ] ; if ( $ context instanceof \ context_module ) { return static :: get_context_module_data ( $ context , $ user ) ; } if ( $ context instanceof \ context_block ) { return static :: get_context_block_data ( $ context , $ user ) ; } return $ basedata ; }
Get all general data for this context.

@param   \context        $context The context to retrieve data for.
@param   \stdClass       $user The user being written.
@return  \stdClass
Get all general data for this context .