Symmetry constrained two Higgs doublet models