public static function create_expired_context($contextid) {
        $record = (object)[
            'contextid' => $contextid,
            'status' => expired_context::STATUS_EXPIRED,
        ];
        $expiredctx = new expired_context(0, $record);
        $expiredctx->save();

        return $expiredctx;
    }
public static function create_expired_context($contextid) {
        $record = (object)[
            'contextid' => $contextid,
            'status' => expired_context::STATUS_EXPIRED,
        ];
        $expiredctx = new expired_context(0, $record);
        $expiredctx->save();

        return $expiredctx;
    }
public static function create_expired_context ( $ contextid ) { $ record = ( object ) [ 'contextid' => $ contextid , 'status' => expired_context :: STATUS_EXPIRED , ] ; $ expiredctx = new expired_context ( 0 , $ record ) ; $ expiredctx -> save ( ) ; return $ expiredctx ; }
Creates an expired context record for the provided context id.

@param int $contextid
@return \tool_dataprivacy\expired_context
Creates an expired context record for the provided context id .