Home > @shopware-pwa/composables > getApplicationContext

# getApplicationContext() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Get the current application context values. The context is either a scope or a component instance. This method checks if the context contains all the necessary data.

This method will likely change in future in order to provide full Vue3 compability.

Signature:

export declare function getApplicationContext(params?: {
    contextName?: string;
}): {
    apiInstance: any;
    router: any;
    route: any;
    routing: SwRouting;
    i18n: any;
    cookies: any;
    shopwareDefaults: any;
    interceptors: any;
    sharedStore: any;
    devtools: any;
    isServer: boolean;
    contextName: string;
} | {
    apiInstance: ShopwareApiInstance;
    router: any;
    route: any;
    routing: SwRouting;
    i18n: any;
    cookies: any;
    shopwareDefaults: ApiDefaults;
    interceptors: SwInterceptors;
    sharedStore: {
        [x: string]: any;
    };
    isServer: boolean;
    contextName: string;
    devtools?: undefined;
};

# Parameters

Parameter Type Description
params { contextName?: string; }

Returns:

{ apiInstance: any; router: any; route: any; routing: SwRouting; i18n: any; cookies: any; shopwareDefaults: any; interceptors: any; sharedStore: any; devtools: any; isServer: boolean; contextName: string; } | { apiInstance: ShopwareApiInstance; router: any; route: any; routing: SwRouting; i18n: any; cookies: any; shopwareDefaults: ApiDefaults; interceptors: SwInterceptors; sharedStore: { [x: string]: any; }; isServer: boolean; contextName: string; devtools?: undefined; }