I need to implement some logic before saving/localizing/unlocalizing a Component. The logic would be the same so I use a GUI extension where I mentioned all commands:
<ext:commandextensions>
<ext:commands>
<ext:command name="Save" extendingcommand="AdditionalProcess" />
<ext:command name="SaveClose" extendingcommand="AdditionalProcess" />
<ext:command name="Localize" extendingcommand="AdditionalProcess" />
<ext:command name="UnLocalize" extendingcommand="AdditionalProcess" />
</ext:commands>
<ext:dependencies>
<cfg:dependency>CommandsExtensions.Commandset</cfg:dependency>
</ext:dependencies>
</ext:commandextensions>
Once additional process done, I need to execute the command which has been extended. For example:
return $cme.getCommand("Save")._execute(selection, pipeline);
Question: How can I set parameter "Save" or "Localize" or "UnLocalize" based on the triggered event?
Or Simply, how Can I find in JS the Command which has been triggered