API - ViewFile

Extends AbstractView

This method makes sure the user is presented with a file download.


This function will be available for every object, this will clone the current object.

Returns Object: An exact copy of the current object

The display method will check if a file has been loaded in the output, if so this file will be returned. If a file has been presented in the path variable a stream will be returned. In a use case, this object will be extended from.

Returns Promise: A Promise containing the file file to download.

This is a private function to allow for config extending This method takes two parameters the first is the original config and the second will be appeneded to this one.

Name Type Description
target Object The config object.
source Object The object to extend the config object.

Return the command chain to run behaviors.

Returns CommandChain: CommandChain object.

Use this function to acquire a variable from config.js

Name Type Description
key String Key to specify the config to return

Returns Object: The requested config value.

Use this function to acquire the identifier object

Returns ObjectIdentifier: Identifier object.

This is a alias of ObjectManager.getObject to use in the "this" context.

Name Type Description
identifier String Identifier of the object to load
config Object|null Config to push to the object

Returns Promise: call ".then" to use the object when ready.

The initialize method will set the mimetype which is set in the override. along with other information.

Name Type Description
config Object The config object for the layout

Returns Promise: The promise containing the view

This is the handler which will try to mixin functions from another object.

Name Type Description
object Object The object to mix into the current object.

This method will set the data to the Object.

Name Type Description
data Object The data for the view object