Added view type getter and ensured element render events would get the proper type

Need a new line above this. Also all vars and methods of this class need proper docblocks to keep the code sniffer happy.