2016-04-04 15 views
2

私はpimcore 3を使用しています。異なるクラスオブジェクトの以前のバージョンが公開されている場合、カスタム検証を行う必要があります。私は別のプラグインで異なるバリデーションを実装する必要があります。問題は、1つ以上のプラグインで同じメソッドをオーバーライドして、1つのオーバーライドメソッドしか動作しない場合です。Pimcore Extjs異なるプラグインで同じメソッドをオーバーライドする方法

Ext.override(pimcore.object.versions, { 
     publishVersion: function (index, grid) { 
      //Code goes here 
     } 
    }); 

私は両方のExtJSとpimcoreに新しいです、任意のヘルプは大歓迎されます。これは私がメソッドをオーバーライドする方法です。 ありがとうございます。

答えて

0
 
I Actually dont know the Extjs Version of doing such Thing. 
but im quite sure u can get around it with Monkey patching. 
by overidding the function where u wrap your plugin functions to it 
example plugin code: 
var old=pimcore.object.versions.prototype.publishVersion; 
pimcore.object.versions.prototype.publishVersion = function(index,grid) { 
    do your stuff 
    return old(index,grid); 
} 
関連する問題