add doctrine event listener.