Reference

Reference

Constructor (Fliplet.Helper)

Defines a new Helper for the current screen. Use the constructor in Global JS code to define it for the entire app.

- public static object Fliplet.Helper(name: String, options: Object)

Fliplet.Helper(name, options);

Parameters:

Name Type Attribute Description
name string required A unique name for your helper.
options object required The configuration option.
options.template string optional An optional HTML template.
options.data object or function optional The data attributes for your helper.
options.ready function optional A function to run when the helper instance is mounted.
options.configuration object optional The list of fields to present in the configuration UI.

Instance properties

Fliplet.Helper(name, {
  ready: function () {
    var instance = this;
  }
});

Parameters:

Name Type Description
instance.set function Update the helper instance attributes.
instance.$el jQuery object The jQuery object containing the helper instance as element.
instance.parent object A reference to the parent helper instance if the current instance is nested (e.g. it's a children element of a parent helper).