YUI.add('mb-notificationmessagecreatorplugin',function(Y){'use strict';varPLUGIN_NAME='mbNotificationMessageCreatorPlugin';/** * Add the notification message creator * * @module mb-notificationmessagecreatorplugin */Y.namespace('mb.Plugin');/** * @namespace mb.Plugin * @class mbNotificationMessageCreator * @constructor * @extends Plugin.Base */Y.mb.Plugin.NotificationMessageCreator=Y.Base.create(PLUGIN_NAME,Y.Plugin.Base,[],{initializer:function(){varnotificationIndicatorView=this.get('host');/** * This will add a message creator to the `notificationIndicatorView`. * In the public method `addNotificationMessageCreator` you have to provide: * 1. The notification type. * 2. The callback to be invoked to create the message in the notification bar. */notificationIndicatorView.addNotificationMessageCreator('myNotificationType',this._createNotificationMessage.bind(this));},/** * Creates a notification message. * * @method _createNotificationMessage * @protected * @param notification {Object} the notification * @return {String} */_createNotificationMessage:function(notification){/** * In this method you have to return a string which will be displayed in the notification bar. * The notification object provided from back end is passed to this method. * This recipes assumes that the message is in object `data`. */returnnotification.data.message;},},{NS:PLUGIN_NAME});Y.eZ.PluginRegistry.registerPlugin(Y.mb.Plugin.NotificationMessageCreator,['notificationIndicatorView']);});

Now create a plugin for the notificationsPopupView. It will be responsible for creating a proper notification struct.
Again start with creating a dependency in yui.yml: