restructured generation templates for Doctrine extensions