Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wizhippo/3839a438acab2ce93d800b013b863e9f to your computer and use it in GitHub Desktop.
Save wizhippo/3839a438acab2ce93d800b013b863e9f to your computer and use it in GitHub Desktop.
YUI.add('exampleplatformuiapp-discoverybarviewplugin', function (Y) {
"use strict";
Y.namespace('examplePlatformUIApp');
Y.examplePlatformUIApp.DiscoveryBarViewPlugin = Y.Base.create('examplePlatformUIAppDiscoveryBarViewPlugin', Y.Plugin.Base, [], {
initializer: function (config) {
var discoveryBarView = this.get('host');
// var user = discoveryBarView.get('app').get('user');
// if (user.get('id') !== 14) {
discoveryBarView.removeAction('viewTrash');
// }
}
}, {
NS: 'examplePlatformUIApp'
});
Y.eZ.PluginRegistry.registerPlugin(
Y.examplePlatformUIApp.DiscoveryBarViewPlugin, ['discoveryBarView']
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment