Top
craft-uikit
craft-widget-

Context

Context

Source:

Application context.

Members

(static) setRouter

Source:

set router. always called by setApp().

(static) getRouter

Source:

get router

Methods

(static) setApp(app)

Source:

Set your application bootloader.

Parameters:
Name Type Description
app Object

your application bootloader

Properties
Name Type Description
didBootApplication function

called jsut after core system booted

(static) getApp() → {Object}

Source:

Get your application bootloader.

Returns:

app - your application bootloader

Type
Object

(static) setRootElement(rootElement)

Source:

Setting Root-Element of your app.

If you have your RootViewController,
Craft.Core.Context.setRootViewController() will set Root-Element according toCraft.Core.Default.BASE_DIV_NAME.
Otherwise, this is optional.

Parameters:
Name Type Description
rootElement Element

(static) getRootElement() → {Element}

Source:

Getting Root-Element of your app.

Returns:

rootElement

Type
Element

(static) setRootViewController(rootViewController)

Source:
See:
  • Craft.UI.DefaultViewController

Setting RootViewController of you application.

If you want to manage popstate and history, you have to set your RootViewController that implements appropriate interface.

Parameters:
Name Type Description
rootViewController Craft.UI.ViewController

rootViewController#resolveRoutingRequest required

(static) getRootViewController() → {Craft.UI.ViewController}

Source:

Getting RootViewController.

Returns:
  • RootViewController of you application
Type
Craft.UI.ViewController