Class: module:argos/_CustomizationMixin

module:argos/_CustomizationMixin()

Customization Mixin is a general purpose Customization Engine. It takes a customization object and a layout object and applies the customization defined to the layout.

A customization object has the following properties:

  • at: function(item) - passes the current item in the list, the function should return true if this is the item being modified (or is at where you want to insert something).
  • at: {Number} - May optionally define the index of the item instead of a function.
  • type: {String} - enum of insert, modify, replace or remove that indicates the type of customization.
  • where: {String} - enum of before or after only needed when type is insert.
  • value: {Object} - the entire object to create (insert or replace) or the values to overwrite (modify), not needed for remove.
  • value: {Object[]} - if inserting you may pass an array of items to create.

Constructor

new module:argos/_CustomizationMixin()

Source:

Members

customizationSet :String

Name of customization set

Type:
  • String
Source:

id :String

id of object taking on customizations. In most cases this will be the view's id.

Type:
  • String
Source:

Methods

_createCustomizedLayout(layout, customizationSubSet)

Applies registered customizations to the given layout.

Parameters:
Name Type Description
layout Array
customizationSubSet String
Source: