Core Description
Functions of the fcf namespace
addDomListener(DOMElement a_element, string a_eventName, object a_owner, function a_cb) - Binds an event handler to a DOM element
addDomListener(DOMElement a_element, string a_eventName, object a_owner, string a_methodName) - Binds an event handler to a DOM element
addDomListener(DOMElement a_element, string a_eventName, object a_owner) - Binds an event handler to a DOM element
mixed append(true|object|array ...args) - Concatenates multiple objects or arrays into one. The first element is the receiver of the data. If the first parameter is true, then copies of the object elements are added, and the second parameter is a target-expandable object.
fcf.Arg argProg(object a_options) - Returns the template argument calculated by the hook hooksProgramableArgument
fcf.Arg argRecordRef(string a_arg) - Returns an object with information about the template argument that references the entry element of the group output template that performs rendering via the view () method, such as tables, sheets, and others.
fcf.Arg argRef(string a_id, string a_arg) - Returns an object with information about the template argument that references another argument. The argument may belong to another template, but if the argument referenced belongs to the current template, then an instance of the function without the a_id parameter can be used. The arguments are tokenized.
fcf.Arg argRef(string a_arg) - Returns an object with information about the template argument that references another argument. The argument may belong to another template, but if the argument referenced belongs to the current template, then an instance of the function without the a_id parameter can be used. The arguments are tokenized.
fcf.Arg argTmpl(string a_template, object a_arguments) - An argument that is expanded in the HTML of the specified template
fcf.Arg argURL(string a_name, object a_options = undefined) - [Since 1.1.56] Returns an object with information about the argument. Changing the value of the template argument on the client also leads to a change in the address bar.
fcf.Arg argVal(mixed a_value, object a_options = undefined) - Returns an object of the template argument of the value type. The template collector tokenized and assembles the nested arguments on the passed value.
mixed clone(mixed a_object) - Creates a copy of the object
int count(string a_object) - Returns the number of elements in a_object.
string decodeHtml(string a_ctxt) - Decodes basic HTML special characters to characters
Event emitDomEvent(Event|object a_data, string a_name, DOMElement a_element) - Raises an event on a DOM element using framework mechanisms.
string encodeHtml(string a_ctxt) - Encodes a string replacing HTML special characters
string escapeQuotes(string a_text) - Escapes quotation marks with a double '\'
mixed find(array|object a_obj, string a_searchString) - Searches in a_obj and returns the key of the found item. If the object is not found, undefined is returned.
mixed find(array|object a_obj, array|object a_searchArray) - Searches in a_obj and returns the key of the found item. If the object is not found, undefined is returned.
mixed find(array|object a_obj, function a_searchCb) - Searches in a_obj and returns the key of the found item. If the object is not found, undefined is returned.
mixed findVal(array|object a_obj, string a_searchString) - Searches in a_obj and returns the value of the found item. If the object is not found, undefined is returned.
mixed findVal(array|object a_obj, array|object a_searchArray) - Searches in a_obj and returns the value of the found item. If the object is not found, undefined is returned.
mixed findVal(array|object a_obj, function a_searchCb) - Searches in a_obj and returns the value of the found item. If the object is not found, undefined is returned.
mixed firstKey(object|array a_object) - Returns a key of the first element in the a_object argument
fcf.Context getContext() - Returns context data for the current session
string getPath(string a_uri, boolean a_isServer = fcf.isServer()) - Returns the real path to a file or resource. On the server side, the path is returned in the filesystem, and on the browser side, the relative path of the URL is returned.
object getRect(DomElement a_element) - Calculates the position and size of the DOM element in absolute window coordinates.
string id(boolean a_unsafeFirstChar = true, int a_size = 32) - Creates a string with random characters. The first symbol is the sign _
array|object insertBefore(array|object a_object, array a_insertItems, mixed|function a_search) - Returns a new object with inserted a_insertItems before a_search items
bool isEnumerable(object a_obj) - Returns true if the a_obj object is enumerable, false otherwise.
bool isServer() - The function defines where the program is executed on the client or server side
module(object a_options) - Executes the FCF module declaration
string padStart(string a_str, string a_fill, integer a_len) - Pads the beginning of a string to the specified length with the characters specified in the pattern.
object prepareObject(object a_root, string a_objectPath) - Creates a branch of nested objects at the path specified by a_objectPath, the path elements are separated by the "." or "/". Objects are created only if they are absent.
array|object removeByValue(array|object a_object, mixed a_value) - Removes an element by a_value from a_object
removeDomListener(object a_owner, string a_element = undefined, string a_eventName = undefined) - Detach DOM event handlers
string replaceAll(string a_str, string a_search, string a_replacement) - Replaces all a_search in a_str with the replaced value a_replacement
fcf.Actions->[...modules] require([string] a_modules, function a_cb = undefined) - [Asynchronous method] Loads JS modules declared via the fcf.module() method
saveContext() - Stores the state of the current context in a data cookie. This method can be called both in the browser and on the server side. O
string stripTags(string a_txt) - Returns a string with excluded HTML characters
string styleToString(string a_name, mixed a_value) - Converts the specified parameters to a string of CSS styles. For size parameters, if a numeric chip is passed, the suffix "px" is added
string styleToString(object a_object) - Converts the specified parameters to a string of CSS styles. For size parameters, if a numeric chip is passed, the suffix "px" is added
string t(string a_txt, string a_language = fcf.getContext().language) - Performs a line translation
string unescape(string a_item) - Unescapes the character string "\"