Created
May 3, 2017 15:57
-
-
Save wizhippo/3839a438acab2ce93d800b013b863e9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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