Add a EventCommand object defined type, refs#7215

Hi @cropalato,

Comments on the diffs from #32 for similar variables and syntax things, like `{}` vs `undef` and the different type of `if` conditional would also apply here.