The base path for JS and CSS files. Defaults to the folder 'static' in the application's root.
The registered CSS files.
A Promise which resolves when this Component has been successfully initialized.
The registered JS code blocks
The registered JS files.
The name of the layout to be applied to the views. This property mainly affects the behavior of render. If false, no layout will be applied.
Marks the ending of an HTML page.
whether the view is rendering in AJAX mode. If true, the JS scripts registered at [[POS_READY]] and [[POS_LOAD]] positions will be rendered at the end of the view like normal scripts.
Finds the view file based on the given view name.
the view name or the path alias of the view file. Please refer to [[render()]] on how to specify this parameter.
the view file path. Note that the file may not exist.
Renders the head html.
Publishes and registers the required asset files for Pwoli.
Publishes and registers the given file at given position
the relative file path
position at which file should be placed. Possible values are head
, begin
, ready
, load
, end
Registers a JS or CSS file.
type (js or css) of the file.
the JS file to be registered.
the HTML attributes for the script tag. The following options are specially handled and are not treated as HTML attributes:
depends
: array, specifies the names of the asset bundles that this CSS file depends on.appendTimestamp
: bool whether to append a timestamp to the URL.the key that identifies the JS script file. If null, it will use $url as the key. If two JS files are registered with the same key at the same position, the latter will overwrite the former. Note that position option takes precedence, thus files registered with the same key, but different position option will not override each other.
Registers a JS code block defining a variable. The name of variable will be used as key, preventing duplicated variable names.
the JS code block to be registered
the position in a page at which the JavaScript variable should be inserted. The possible values are:
Renders a view.
The view to be rendered can be specified in one of the following formats:
the view name.
the parameters (name-value pairs) that will be extracted and made available in the view file.
whether the view should be rendered inside a layout if it's available.
string the rendering result
Renders the content to be inserted at the end of the body section. The content is rendered using the registered JS code blocks and files.
whether the view is rendering in AJAX mode. If true, the JS scripts registered at [[POS_READY]] and [[POS_LOAD]] positions will be rendered at the end of the view like normal scripts.
string the rendered content
Renders a view file.
the view file. This can be either an absolute file path or an alias of it.
the parameters (name-value pairs) that will be extracted and made available in the view file.
string the rendering result
Renders the content to be inserted in the head section. The content is rendered using the registered meta tags, link tags, CSS/JS code blocks and files.
the rendered content
Sets the layout for the this view instance.
the layout path
the view instance itself
Generated using TypeDoc
View represents a view object in the MVC pattern.
View provides a set of methods (e.g. render) for rendering purpose.
View is configured as an application component in Application by default. You can access that instance via
Application.view
.For more details and usage information on View, see the guide article on views.
Mahesh S Warrier https://github.com/codespede