/* global registerGlobalBackward, DataProviderFacade, BackwardUtility */

registerGlobalBackward('1.2.34', function (control) {
    'use strict';

    if (DataProviderFacade.getCmsInfo().cmsName === 'Drupal') {
        var controls = Object.keys(control.controls);
        for (var i = 0; i < controls.length; i++) {
            if (control.controls[controls[i]].constructorName === 'CartLink') {
                delete control.controls[controls[i]];
            }
        }

        control.prototypes.vmenu = BackwardUtility.getControlObject('VMenu');
    }

    return control;
});