Add defineFunction method to the theme manager.