...
Example 1 - Altering the search, list and get methods
The following code snippet provides an example where snippet shows how the search, list and get methods have been can be altered.
Code Block |
---|
asset.manager = function(ctx) { return { search: function(query, paging) { return this._super.search.call(this, query, paging); }, list: function(paging) { return this._super.list.call(this, paging); }, get: function(id) { return this._super.get.call(this, id); } }; }; |
Example 2 -
...
Calling the parent implementation when overriding a method
A method that is overridden can still call the parent implementation of a method by using the _super
property. You can use the _super
property, which is a reference to the parent object, to call any of the parent methods. An example of this usage is as follows:
...