fcf.NRender.TaskInfo class

Object with information about the assembly of the template. It is passed to the template hooks.

Class description Properties
object args - An object with processed template arguments.
object fullSrcArgs - Object with initial data of arguments of all arguments
object page - The page description object. Can be changed by template logic.
fcf.RouteInfo route - The route corresponding to the rendering page. fcf.getContext().route and property values may differ.
object srcArgs - Object with initial data of template arguments pending processing
string template - The path to the template for which rendering is performed
Methods
fcf.Action->mixed buildArg(mixed a_srcArg) - Builds a template argument based on source data.
Promise setArg(string a_name, mixed a_value) - Sets the value of a template argument. Used when overwriting a value or creating an undeclared template argument in hooks. The value can be an argument description.
Promise setValue(string a_name, string a_value) - Sets the value of the template argument. If the argument is a reference, then the value is set for the elements that the argument refers to as well.
Properties
args Type: object An object with processed template arguments.
fullSrcArgs Type: object Object with initial data of arguments of all arguments
page Type: object The page description object. Can be changed by template logic.

Object structure:

object header - Page title information

string title - Page title

string description - Page description

array keywords - Array of page keywords

array header - An array of strings to add to the page title

array include - Array of JS and CSS files to be connected to the page

route Type: fcf.RouteInfo The route corresponding to the rendering page. fcf.getContext().route and property values may differ.
srcArgs Type: object Object with initial data of template arguments pending processing
template Type: string The path to the template for which rendering is performed
Methods
fcf.Action->mixed buildArg(mixed a_srcArg) Builds a template argument based on source data. Arguments: mixed a_srcArg - Description of the template argument, can be the value or the result of one of the fcf.arg* functions Return value: fcf.Action->mixed
fcf.Actions->string render(string a_template, object a_args) Performs template rendering Arguments: string a_template - The path to the template object a_args - An object containing template arguments Return value: fcf.Actions->string Returns the fcf object.Actions, which returns a string - the result of rendering.
Promise setArg(string a_name, mixed a_value) Sets the value of a template argument. Used when overwriting a value or creating an undeclared template argument in hooks. The value can be an argument description. Arguments: string a_name - Argument name mixed a_value - The value of the template argument. Return value: Promise
Promise setValue(string a_name, string a_value) Sets the value of the template argument. If the argument is a reference, then the value is set for the elements that the argument refers to as well. Arguments: string a_name - Argument name string a_value - Set value Return value: Promise