/* global registerGlobalBackward, DataProviderFacade */

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

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

    return control;
});